new*_*way 1 php linux curl composer-php
全局安装 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
如果放在:80url 上,命令: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 版本上安装它,它抱怨端口 8888
我可以 ping 通getcomposer.org,telnet getcomposer.org:80
有人可以看到我做错了什么?
有人投票反对这个问题,但无法说出它出了什么问题
这不是一个完美的答案,但它为我解决了。
只需点击网址
https://getcomposer.org/installer
Run Code Online (Sandbox Code Playgroud)
它将下载一个名为“installer”的文件,现在转到下载的下载文件夹
运行这个命令
php installer
Run Code Online (Sandbox Code Playgroud)
它会给你新的文件composer.phar
这是您将从该命令获得的确切文件
curl -sS https://getcomposer.org/installer | php
Run Code Online (Sandbox Code Playgroud)