[PHP] 解决composer install报错: it could not be found in any version, there may be a typo in the package

2021-06-21 20:23:57 浏览数 (1)

当搭建使用laravel项目的时候 ,报了一堆这个错误

it could not be found in any version, there may be a typo in the package name

我出现这个的原因是,我安装的composer最新版是2.1.3版本

默认的镜像源是

https://packagist.phpcomposer.com

把镜像源改成阿里的就解决了

composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

查看镜像源地址

composer config -l -g

0 人点赞