使用composer install的时候出现如下报错是什么情况?

图片描述

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.

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

阅读 5k
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。

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

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题