php composer.phar install大量报错could not be found in any version, there may be a typo in the package name

报错原因:

在执行php composer.phar后,再执行

php composer.phar install

后如下图报错。

报错示例:

php composer.phar install大量报错could not be found in any version, there may be a typo in the package name
php composer.phar install大量报错could not be found in any version, there may be a typo in the package name

我知道是执行下面命令修改了composer全局配置文件的默认地址改为中国镜像地址后出现这个情况的

composer config -g repo.packagist composer https://packagist.phpcomposer.com  //默认地址改为中国镜像地址

解决方法:

折腾半天不知道怎么回事,后来突然想到要改 composer全局配置文件的镜像地址改回为国外默认镜像地址 ,使用下面命令:

composer config -g repo.packagist composer https://packagist.org  //镜像地址改为成默认国外地址

修改为国外地址后,再次执行

php composer.phar install
php composer.phar install大量报错could not be found in any version, there may be a typo in the package name

等待了几分钟后install成功!

Linux技术脚本

解决Linux执行脚本报错 /bin/bash^M: 坏的解释器: 没有那个文件或目录

2021-8-28 16:28:02

技术脚本

js报错TypeError: Cannot find function match in object

2021-9-24 8:36:46