首页 > 建站教程 > PHP教程 >  解决curl error 28 while downloading https://repo.packagist.org/packages.json: Timeout was reac head正文

解决curl error 28 while downloading https://repo.packagist.org/packages.json: Timeout was reac head

下载 https://repo.packagist.org/packages.json 时出现 curl 错误 28:Timeout was reac head,超时问题,解决方案跟npm一样,要么开代理(有时候开也不好用),要么换国内镜像。

composer 更改为国内镜像源(我这里选的阿里源):

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

然后再下载就好了