composer 安装laravel5.5 报错:
[Composer\Downloader\TransportException]
The "https://repo.packagist.org/p/laravel/laravel.json" file could not be downloaded: failed to open stream: Connection timed out
或者报错:
[Composer\Downloader\TransportException]
The "http://packagist.org/packages.json" file could not be downloaded: failed to open stream: HTTP request failed!
解决办法,更改composer的源为阿里的地址即可。
有关composer使用请参照阿里镜像源文档:https://developer.aliyun.com/composer?spm=a2c6h.13651102.0.0.3e221b11PUXlFo
更换composer源:
#更改composer镜像源为国内地址
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/