Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"https://packagist.org/packages.json" file could not be downloaded

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?

like image 419
Saani Avatar asked Jul 26 '15 11:07

Saani


2 Answers

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

like image 145
Tharindu Wickramasinghe Avatar answered Oct 11 '22 20:10

Tharindu Wickramasinghe


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
like image 43
André Schild Avatar answered Oct 11 '22 21:10

André Schild