php - composer laravel install: "http://packagist.org" file could not be downloaded

431

I want to install laravel 2.2 through composer with

$ composer create-project --prefer-dist laravel/laravel sampleBackend 5.2

but every time i do that composer shows a message:

The "http://packagist.org/p/provider-2014%2490c266c2df21924a932e564b7f39bf03d55b933fbe43744a6056eab59b7b4cf9.json" file could not be downloaded: failed to open stream: HTTP request failed! http://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date

235

Answer

Solution:

Clear composer cache first by running

composer clear-cache

Then run this command

composer -vvv

This solution worked for me when I was trying to install laravel.

People are also looking for solutions to the problem: php - Why does PHPSESSID not exists in cookies.sqlite in Firefox?

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.