【问题标题】:Yii2.0 installation is not working using composerYii2.0 安装无法使用 composer
【发布时间】:2016-03-08 02:44:12
【问题描述】:

composer create-project --prefer-dist yiisoft/yii2-app-basic basic
以下是上述命令的输出

Installing yiisoft/yii2-app-basic (2.0.6)  
  - Installing yiisoft/yii2-app-basic (2.0.6)  
    Loading from cache  
Created project in basic 
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

 Problem 1
- yiisoft/yii2 2.0.6 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
- yiisoft/yii2 2.0.5 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
- Installation request for yiisoft/yii2 >=2.0.5 -> satisfiable by yiisoft/yii2[2.0.5, 2.0.6].

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.

【问题讨论】:

  • 你安装了 fxp 作曲家资产插件吗? composer global require "fxp/composer-asset-plugin:~1.1.1"
  • @soju 是的,我刚刚安装并且它正在工作。感谢您的帮助

标签: yii2 composer-php


【解决方案1】:

请参考installation guide。看来您缺少资产插件:

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

【讨论】:

  • 是的,我刚刚安装了 fxp 作曲家及其工作。感谢您的帮助
【解决方案2】:

你应该在运行之前先运行composer clear-cache

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

这对我有用。

【讨论】:

    猜你喜欢
    • 2015-12-29
    • 2018-04-17
    • 2015-12-02
    • 2017-10-26
    • 1970-01-01
    • 2015-04-03
    • 2018-10-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多