Windows Composer安装问题 [英] Windows composer install issue
问题描述
我正在尝试从 http://getcomposer.org/download/通过composer-setup.exe安装composer。 ,我收到以下错误消息:
I'm trying to install composer via the composer-setup.exe from http://getcomposer.org/download/ and I'm getting the following error:
连接错误[ERR_CONNECTION]:无法连接到getcomposer.org
Connection Error [ERR_CONNECTION]: Unable to connect to getcomposer.org
请求 https://getcomposer.org/installer 失败,并显示以下错误:SSL:
操作成功完成。 。
errno = 10054发送25个字节失败,远程
主机强行关闭了现有连接。 。 23个字节的发送失败,错误码为errno = 10054,远程主机强行关闭了现有的
连接。 。 2字节
的发送失败,错误为errno = 10054,远程主机
强制关闭了现有连接。 。无法打开流:HTTP请求失败!
Request to https://getcomposer.org/installer failed with errors: SSL: The operation completed successfully. . Send of 25 bytes failed with errno=10054 An existing connection was forcibly closed by the remote host. . Send of 23 bytes failed with errno=10054 An existing connection was forcibly closed by the remote host. . Send of 2 bytes failed with errno=10054 An existing connection was forcibly closed by the remote host. . Failed to open stream: HTTP request failed!
我尝试禁用防病毒/防火墙,但是我仍然遇到相同的错误。我搜索了google,但无法解决此问题。这里有什么帮助吗?谢谢。
I tried disabling my antivirus/firewall but I keep on getting the same error. I searched google but couldn't resolve this. Any help here? Thanks.
推荐答案
在正确的php.ini中启用了SSL吗?
Is SSL enabled in the correct php.ini?
如果通过Windows可执行文件的安装方法失败,则
可能会切换到仅下载 composer.phar
到您的PHP目录,例如 C:\php\composer.phar
。
If the installation approach via the windows executable fails,
you might switch to just downloading the composer.phar
to your PHP dir, e.g. C:\php\composer.phar
.
然后添加 composer.bat
文件将命令转发到PHAR文件: C:\php
文件夹中的
Then add composer.bat
file inside the C:\php
folder which forwards commands to the PHAR file:
@ECHO OFF
php "%~dp0composer.phar" %*
也将路径添加到您的php目录(例如 C:\php
)到路径
在您的系统变量中。这导致了作曲家的全球安装。您可以在任何项目路径上调用作曲家。
Also add the path to your php directory (e.g. C:\php
) to the Path
in your System variables. This result in a global installaton of composer. You can call composer on any project path.
这篇关于Windows Composer安装问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!