gpt4 book ai didi

php - 在 window 10 中安装 laravel 安装程序时出现错误

转载 作者:可可西里 更新时间:2023-11-01 12:56:22 28 4
gpt4 key购买 nike

我正在使用 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

最佳答案

要解决此问题,请在 安装 Laravel

之前在 cli 上运行以下命令,将 composer 配置为使用 https 存储库

composer config -g repo.packagist composer https://packagist.org

关于php - 在 window 10 中安装 laravel 安装程序时出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53986012/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com