composer安装包时报any version for your minimum-stability (stable)

今天要装一个包endroid/qrcode,可是死活装不上。
composer require 安装的时候一直报

[InvalidArgumentException]
Could not find package endroid/qrcode at any version for your minimum-stability (stable). Check the pac
kage spelling or your minimum-stability

然后新composer init一个空项目就能装上了。然后开始分析我的现有项目的composer.json文件。

最后发现是之前使用了国内的composer镜像,加上了一个配置


{
"repositories": [
{
"packagist": false
},
{
"type": "composer",
"url": "http://packagist.phpcomposer.com"
}
]
}

之前只把后一段给删了,没有删前一段。把前一段的“packagist”: false 也删了就好了。

This entry was posted in PHP & MYSQL and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


*