【发布时间】:2019-05-27 21:37:49
【问题描述】:
我使用的是 Windows 10 并安装了 composer。当我尝试使用此命令全局安装laravel 安装程序时:
composer global require laravel/installer
[Composer\Downloader\TransportException]
The "https://repo.packagist.org/packages.json" file could not be downloaded:
failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
这意味着包没有下载。我没有使用任何代理服务器。 Composer诊断结果如下:
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist:
[Composer\Downloader\TransportException] The "http://repo.packagist.org/packages.json" file could not be downloaded: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Checking https connectivity to packagist:
[Composer\Downloader\TransportException] The "https://repo.packagist.org/packages.json" file could not be downloaded: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Checking github.com rate limit: FAIL
[Composer\Downloader\TransportException] The
"https://api.github.com/rate_limit" file could not be downloaded: failed to
open stream: A connection attempt failed because the connected party did not
properly respond after a period of time, or established connection failed
because connected host has failed to respond.
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952 OK
Checking composer version: OK
Composer version: 1.8.0
PHP version: 7.2.1
PHP binary path: E:\xampp\php\php.exe
【问题讨论】:
-
可能是网络问题。您是否尝试过使用不同的互联网连接?
-
是的,我已经尝试了 3-4 个网络,当我将另一个系统与这些网络连接时,它工作正常。
-
既然可以使用 laragon,为什么还要手动安装呢? (laragon.org)
-
您可以在浏览器中打开链接 (
https://repo.packagist.org/packages.json) 吗? -
嗨,安迪,我不知道 laragon。
标签: php composer-php laravel-5.5