错误
1 Potential causes: 2 - A typo in the package name 3 - The package is not available in a stable-enough version according to your minimum-stability setting 4 see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details. 5 6 Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
解决
官方文档
http://www.yiiframework.com/doc-2.0/guide-start-installation.html#installing-via-composer
先执行如下命令
composer global require "fxp/composer-asset-plugin:~1.1.1"
再次安装时就不会出现这个问题了
composer create-project --prefer-dist yiisoft/yii2-app-basic basic
composer 安装yii2 命令
php composer.phar create-project yiisoft/yii2-app-basic basic 2.0.7
php composer.phar create-project yiisoft/yii2-app-advanced advanced 2.0.7
从旧版本升级
如果你是通过 composer 从 Yii 2.0.0 升级,只需要在你的项目根目录运行以下命令:
php composer.phar require yiisoft/yii2 2.0.7