无法安装Yii 2的JUI Extension

时间:2015-05-11 12:05:26

标签: yii composer-php yii2

我想为Yii 2安装JUI Extension,但作曲家报告了以下问题:

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.

我可以做些什么来解决这个问题?

3 个答案:

答案 0 :(得分:10)

最后我找到了解决方案:

如果要为Yii2安装JUI扩展,则应执行以下步骤:

  1. 运行以下composer命令:php composer.phar require "fxp/composer-asset-plugin:~1.0"
  2. 运行php composer.phar update
  3. 运行php composer.phar require --prefer-dist yiisoft/yii2-jui

答案 1 :(得分:2)

当我尝试为Yii2框架安装Kartik的扩展时,我遇到了同样的问题。将"fxp/composer-asset-plugin": "*"添加到 composer.json 文件的 require 部分即可解决此问题。

答案 2 :(得分:2)

首先需要安装Composer Asset Plugin:

composer global require "fxp/composer-asset-plugin:~1.0"

这个对我有用