我想为yii 2安装jui扩展名,但作曲家报告了以下问题:
Your requirements could not be resolved to an installable set of packages.
- yiisoft/yii2-jui 2.0.4 requires bower-asset/jquery-ui 1.11.*@stable -> no matching package found.
- yiisoft/yii2-jui 2.0.3 requires bower-asset/jquery-ui 1.11.*@stable -> no matching package found.
- yiisoft/yii2-jui 2.0.2 requires bower-asset/jquery-ui 1.11.*@stable -> no matching package found.
- yiisoft/yii2-jui 2.0.1 requires bower-asset/jquery-ui 1.11.*@stable -> no matching package found.
- yiisoft/yii2-jui 2.0.0 requires bower-asset/jquery-ui 1.11.*@stable -> no matching package found.
- Installation request for yiisoft/yii2-jui ^2.0 -> satisfiable by yiisoft/yii2-jui[2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Installation failed, reverting ./composer.json to its original content.
为了解决这个问题,我该怎么办?
最后我找到了解决方案:
如果要安装YII2的JUI扩展名,则应执行以下步骤:
- 运行以下作曲家命令:
php composer.phar require "fxp/composer-asset-plugin:~1.0"
- 运行
php composer.phar update
- 运行
php composer.phar require --prefer-dist yiisoft/yii2-jui
我在尝试安装YII2框架的Kartik扩展程序时遇到了相同的问题。将 "fxp/composer-asset-plugin": "*"
添加到我的 composer.json 文件解决的部分。
需要先安装Composer Asset插件:
composer global require "fxp/composer-asset-plugin:~1.0"
这个对我有用