全局安装composer的步骤如下:https://getcomposer.org/doc/00-intro.md#globally
命令有:
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
但原来的命令:
curl -sS https://getcomposer.org/installer | php
返回:curl: (7) Failed connect to getcomposer.org:8888; Connection refused
如果将:80
放在url上,则命令为:curl -sS https://getcomposer.org:80/installer | php
返回:curl: (7) Failed connect to getcomposer.org:8888; Connection refused
如果告诉端口-P
命令:curl -sS -P 80 https://getcomposer.org/installer | php
返回:curl: (7) Failed connect to getcomposer.org:8888; Connection refused
有人在这里:Installing composer using vagrant, hhvm, and Ubuntu 14.04
告诉我尝试wget我尝试了结果:
命令:wget https://getcomposer.org/installer
返回:--2014-08-29 19:13:24-- https://getcomposer.org/installer Connecting to 127.0.0.1:8888... failed: Connection refused
。
命令:wget https://getcomposer.org:80/installer
。
returns: --2014-08-29 19:13:40-- https://getcomposer.org:80/installer Connecting to 127.0.0.1:8888... failed: Connection refused
我将它安装在Linux Mint Debian Edition上,它抱怨端口8888
我可以ping getcomposer.org
和telnet getcomposer.org:80
有人可以看到我做错了什么?
有人投票反对这个问题,但无法分辨出它有什么问题
答案 0 :(得分:1)
出于某种原因,Curl尝试使用ipv6下载compose,结果是超时。
尝试: 回声ipv4 >>〜/ .curlrc
然后重试: curl -sS https://getcomposer.org/installer | php