关于composer报错 [ 2.0 版本 ]
包的地址:
https://packagist.org/packages/newerton/yii2-fancybox
github地址:
github.com/newerton/yii2-fancybox
包的说明:
php: >=5.4.0
yiisoft/yii2: *
bower-asset/fancybox: @stable
bower-asset/jquery-mousewheel: ~3.1.3
我的 composer.json 文件写入如下:
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": ">=2.0.4",
"yiisoft/yii2-bootstrap": "*",
"yiisoft/yii2-swiftmailer": "*",
"kartik-v/yii2-widget-datepicker": "dev-master",
"bower-asset/fancybox": "@stable",
"bower-asset/jquery-mousewheel": "~3.1.3"
},
composer install之后:
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
- The requested package bower-asset/fancybox could not be found in any version, there may be a typo in the package name.
Problem 2
- The requested package bower-asset/jquery-mousewheel could not be found in any version, there may be a typo in the package name.
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/_g2ASeIFlrc/discussion> for more details.
Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
我想知道,为什么出这个错误以及怎么解决?不胜感谢!
最佳答案
-
提示包没找到,具体原因没看出来。
安装yii时有个命令是:composer global require "fxp/composer-asset-plugin:~1.0.0"
不知道可与这个有关
共 3 条回复bryson 觉得很赞
其他 2 个回答
-
-
composer.json 裡面改
require
應該不能用composer install
composer install 應該是修改 composer.lock 時才會去抓
但composer 提示好像不太一樣 (應該不是這個問題)我剛剛下載過是可以的
不然你composer global update
重新過濾一次
在composer update
一次看看或者 composer 本身版本過舊 可以先升級版本
共 4 条回复bryson 觉得很赞
了然听雨
注册时间:2015-06-08
最后登录:2016-04-21
在线时长:12小时34分
最后登录:2016-04-21
在线时长:12小时34分
- 粉丝5
- 金钱435
- 威望0
- 积分555