1

The steps to install composer globally is there: https://getcomposer.org/doc/00-intro.md#globally

The commands there are:

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

but The original the command: curl -sS https://getcomposer.org/installer | php returns: curl: (7) Failed connect to getcomposer.org:8888; Connection refused

if put :80 on url the command: curl -sS https://getcomposer.org:80/installer | php
returns: curl: (7) Failed connect to getcomposer.org:8888; Connection refused

if tell port with -P the command: curl -sS -P 80 https://getcomposer.org/installer | php
returns: curl: (7) Failed connect to getcomposer.org:8888; Connection refused

Someone here: Installing composer using vagrant, hhvm, and Ubuntu 14.04
told to try wget I tried and the results:

The command: wget https://getcomposer.org/installer
returns: --2014-08-29 19:13:24-- https://getcomposer.org/installer Connecting to 127.0.0.1:8888... failed: Connection refused.

The command: 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
.

Im installing it on a Linux Mint Debian Edition and it complain about port 8888
I can ping getcomposer.org and telnet getcomposer.org:80
Someone can see what im doing wrong?
Someone voting against this question but is unable to tell what is wrong with it

Community
  • 1
  • 1
newway
  • 647
  • 1
  • 13
  • 21
  • Curl should be connecting to getcomposer.org on port 443 as its a https website. What is the output of `curl -v https://getcomposer.org/installer -o /dev/null` ? – Yuvika Aug 30 '14 at 11:04
  • 1
    This looks like a local proxy to me. Are there any environment variables related to "proxy" defined? – Sven Aug 30 '14 at 18:38

2 Answers2

5

This is not a perfect answer but it solved for me.

just hit the url

https://getcomposer.org/installer

it'll download a file name "installer", Now go to the download folder where it downloaded

Run this command

php installer

It'll give you new file composer.phar

This is the exact file that you will get from this command

curl -sS https://getcomposer.org/installer | php
gsjha
  • 108
  • 1
  • 6
1

Fot some reason Curl try using ipv6 to download compose, and the result is a time out.

try this: echo ipv4 >> ~/.curlrc

then try again: curl -sS https://getcomposer.org/installer | php