谁一开始就是大神?

关于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版本(命令:composer selfupdate),
删除缓存后OK了。
composer.json 裡面改 require 應該不能用 composer install
composer install 應該是修改 composer.lock 時才會去抓
但composer 提示好像不太一樣 (應該不是這個問題)
我剛剛下載過是可以的
不然你 composer global update 重新過濾一次
composer update 一次看看
或者 composer 本身版本過舊 可以先升級版本

赞(0) 打赏
未经允许不得转载:菜鸟之家 » 关于composer报错[2.0]

评论 抢沙发

登录

找回密码

注册