Failed to load file https://packagist.org/packages.json

I am trying to set up a new laravel instance using the following command:

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

      

But I ran into the following problem: enter image description here

My internet connection on the proxy server: 192.168.20.9:8080

Also, I help on the Windows platform win8.1 x64

and Xampp

with PHP 5.6.11

?

+8


source to share


4 answers


You must tell the composer to use a proxy.

The link is here: PHP Composer behind HTTP proxy and Composer cannot download files



how

export HTTP_PROXY="http://my-corp-proxy.mcdonalds"
php composer.phar install

      

+4


source


Linux users can run this command to fix this problem:

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

      



Additional Information

+8


source


A 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 this, the composer worked fine.

+3


source


For windows users open cmd and enter this command

set http_proxy= xxx.xxx.xxx.xxx:xxxx (YOUR_IP:PORT)
set https_proxy= xxx.xxx.xxx.xxx:xxxx (YOUR_IP:PORT)

      

0


source







All Articles