composer: Composer install doesn't work
I tried this
curl -sS http://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
This is what I get
All settings correct for using Composer PHP Warning: file_get_contents(https://getcomposer.org/versions): failed to open stream: Connection timed out in - on line 762 PHP Warning: Invalid argument supplied for foreach() in - on line 508 None of the 0 stable version(s) of Composer matches your PHP version (5.6.26-0+deb8u1 / ID: 50626)
I already checked the connection, to get that out the way by
curl -sS https://getcomposer.org/versions
and get
{
"stable": [{"path": "/download/1.2.1/composer.phar", "version": "1.2.1", "min-php": 50300}],
"preview": [{"path": "/download/1.2.1/composer.phar", "version": "1.2.1", "min-php": 50300}],
"snapshot": [{"path": "/composer.phar", "version": "66efc9af8601234b8ab3a5fb91cfa7a2f30e9bbd", "min-php": 50300}]
}
Iām on Debian Jessie in a Virtualbox
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 19 (7 by maintainers)
I have disabled IPv6 under debian, and then it was working fine. š nano /etc/sysctl.conf && sysctl -p
What about:
Ok, I tried it.
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
gives me PHP Warning: copy(http://getcomposer.org/installer): failed to open stream: Connection timed out in Command line code on line 1Then I downloaded the installer manually, renamed it composer-setup.php and tried the next step but it gave me the same exception php composer-setup.php All settings correct for using Composer PHP Warning: file_get_contents(https://getcomposer.org/versions): failed to open stream: Connection timed out in ./composer-setup.php on line 762 PHP Warning: Invalid argument supplied for foreach() in ./composer-setup.php on line 508 None of the 0 stable version(s) of Composer matches your PHP version (5.6.26-0+deb8u1 / ID: 50626)
@sigysmund while that is one way to solve ipv6 related problems, you could also try a slightly less drastic approach: https://getcomposer.org/doc/articles/troubleshooting.md#operation-timed-out-ipv6-issues-
@sigysmund Please contact your ISP if disabling IPv6 helps resolve anything. They should fix their routing rules.