1

我正在尝试在 Yii2 中安装2amigos 日期选择器,但出现以下错误:

C:\xampp\htdocs\advanced>php composer.phar require "2amigos/yii2-date-picker-widget" "*"
./composer.json has been updated
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.2 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
    - yiisoft/yii2 2.0.2 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
    - Installation request for yiisoft/yii2 == 2.0.2.0 -> satisfiable by yiisoft/yii2[2.0.2].

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 <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Installation failed, reverting ./composer.json to its original content.

我已经尝试编辑composer.json文件,更改minimum-stabilitydev,但这仍然不起作用。

4

1 回答 1

3

确保使用以下命令安装 composer 资产插件:

composer global require "fxp/composer-asset-plugin:1.0.0"

它应该只执行一次。

在官方指南插件官方文档中阅读更多内容。

如果安装过程中出现其他问题,请使用命令更新composer到最新版本。self-update

于 2015-02-06T05:10:59.417 回答