12

I am trying to install a new laravel instance with the following command:

composer create-project laravel/larevel authii --prefer-dist

But I am encountering the following problem: enter image description here

My internet connection is on proxy server: 192.168.20.9:8080 Moreover, I am on windows platform win8.1 x64 and Xampp with PHP 5.6.11, any help?

Saani
  • 858
  • 5
  • 25
  • 58

5 Answers5

15

Linux users can run this command to resolve this issue:

sudo sh -c "echo 'precedence ::ffff:0:0/96 100' >> /etc/gai.conf"

More Information

rob006
  • 20,201
  • 5
  • 46
  • 66
6

You need to tell composer to use a proxy.

Linke here: PHP Composer behind http proxy and Composer cannot download files

Like:

export HTTP_PROXY="http://my-corp-proxy.mcdonalds"
php composer.phar install
Community
  • 1
  • 1
André Schild
  • 4,268
  • 5
  • 26
  • 39
  • 1
    Why is this happening? I have this error now, nothing changed in my envirnoment, AT ALL. – nclsvh Feb 04 '17 at 23:50
  • Just an extra. On [Composer's troubleshooting page](https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode) it says something about ipv6 compatibility issues. Just disable ipv6, run composer and enable it again. – Marcos Rocha Apr 01 '19 at 14:22
5

The fix for me was found here: https://getcomposer.org/doc/articles/troubleshooting.md#operation-timed-out-ipv6-issues-.

I had to disable IPv6 on my network interfaces. After disabling that, composer worked fine.

TheTC
  • 627
  • 8
  • 18
2

I noticed that this also happens when changing the networks. If I put the comüputer to sleep and then continue connected to other networks this happens. So either restart the computer or your docker. Seems to work for me. Had the issue 2 times already.

Herr Nentu'
  • 1,378
  • 1
  • 17
  • 48
0

For windows user open cmd and put this command

set http_proxy= xxx.xxx.xxx.xxx:xxxx (YOUR_IP:PORT)
set https_proxy= xxx.xxx.xxx.xxx:xxxx (YOUR_IP:PORT)
Parth kharecha
  • 4,923
  • 4
  • 23
  • 36