php - 使用composer install的时候出现如下报错是什么情况?
巴扎黑
巴扎黑 2017-04-11 09:21:22
[PHP讨论组]

D:wwwopensourceyii2-apidoc-master>composer install Loading composer
repositories with package information Updating dependencies (including
require-dev) Your requirements could not be resolved to an installable
set of packages.

Problem 1

- yiisoft/yii2 2.0.x-dev requires bower-asset/punycode 1.3.* -> no matching package found.
- yiisoft/yii2 2.0.9 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable  | 1.11.*@stable | 1.12.*@stable -> no matching package found.
- yiisoft/yii2 2.0.8 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable  | 1.11.*@stable -> no matching package found.
- yiisoft/yii2 2.0.7 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable  | 1.11.*@stable -> no matching package found.
- yiisoft/yii2 2.0.6 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stabl e -> no matching package found.
- yiisoft/yii2 2.0.5 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stabl e -> no matching package found.
- yiisoft/yii2 2.0.4 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stabl e -> no matching package found.
- yiisoft/yii2 2.0.10 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stabl e | 1.11.*@stable | 1.12.*@stable -> no matching package found.
- Installation request for yiisoft/yii2 ~2.0.4 -> satisfiable by yiisoft/yii 2[2.0.10, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.0.9,

2.0.x-dev].

Potential causes:

  • A typo in the package name

  • The package is not available in a stable-enough version according to your min imum-stability setting see
    https://getcomposer.org/doc/0... for more

det ails.

Read https://getcomposer.org/doc/a... for
further commo n problems.

D:wwwopensourceyii2-apidoc-master>D:wwwopensourceyii2-apidoc-masterapidoc
.bat

The Yii Framework 2.0 does not seem to be installed. Try running
composer instal l.

报如上错误,请问是什么情况

巴扎黑
巴扎黑

全部回复(2)
天蓬老师

要用composer插件,例如下面这个composer.json是不行的,产生和题主相同的错误信息:

{
    "name": "oraoto/yii2-test",
    "require": {
        "yiisoft/yii2": "~2.0"
    },
    "authors": [
        {
            "name": "oraoto",
            "email": "xx@xx.com"
        }
    ]
}

安装composer插件:

composer global require "fxp/composer-asset-plugin:^1.2.0"

然后再安装。

不想全局安装也可以,先去掉yii2, 然后composer require --dev "fxp/composer-asset-plugin:^1.2.0",再加回yii2。

阿神

大兄弟,你的图片可以清楚点吗,查看原图还是看不清楚啊

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号