php - composer selfupdate 连接被对等方重置

标签 php windows ubuntu composer-php debian

我在 Windows 中使用 ubuntu,当我运行 composer selfupdate Composer 给我一个错误
[Composer\Downloader\TransportException] The "https://getcomposer.org/versions" file could not be downloaded: SSL: Connection reset by peer Failed to enable crypto failed to open stream: operation failed
这与 Windows 的 debian 中的错误相同。

但是当我运行 composer selfupdate在windows的powershell上

我没有任何错误。

配置 ubuntu
php -v PHP 7.0.28-0ubuntu0.16.04.1 (cli) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.0.28-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans
conf debian
php -v PHP 7.1.18-1+0~20180611145904.18+stretch~1.gbp2b32f6 (cli) (built: Jun 11 2018 14:59:07) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.1.18-1+0~20180611145904.18+stretch~1.gbp2b32f6, Copyright (c) 1999-2018, by Zend Technologies
配置窗口

Windows 10 专业版
版本 1803
版本操作系统 17134.1
php -v PHP 7.0.23 (cli) (built: Aug 29 2017 06:13:57) ( ZTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies

最佳答案

尝试禁用您的防病毒软件,或尝试根据您使用的客户端将该连接列入白名单。
我已经在卡巴斯基遇到了这个问题。

一旦禁用,问题就消失了。

关于php - composer selfupdate 连接被对等方重置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51266332/

相关文章:

ruby-on-rails - 如何在 Windows 上安装 RedCloth?

php - session 混淆 PHP

php - 更新 Yii 框架上唯一键的重复输入错误

php - 意外的 T_VARIABLE,期待 T_FUNCTION 修复

python - 引发异常时,如何停止CMD(来自subprocess.popen)关闭?

windows - 在计算模拟器下启动 Azure Web 角色时出现 "No endpoint listening"

ubuntu - 尝试运行 2 个 Kinect 时在 ubuntu 中出现 libusb 错误

javascript - 更改 node_args 后 Pm2 重启 Node.js 进程

python - 权限错误 : [Errno 13] Permission denied: despite granting permission in Dockerfile - what could be the issue?

php - 使用 PHP EHLO 进行 SMTP 验证