3

After installing composer I check it with this command:

composer diagnose

And all things are OK. When I run this command for latest version of Laravel:

composer global require "laravel/installer"

I get error:

[Composer\Downloader\TransportException] The "http://packagist.org/p/provider-2017-01%24b61fc29958261afed83292382737d143f41e535c0e562e62e6aaf5bf30978746.json" file could not be downloaded: failed to open stream: HTTP request failed!

Or for this command:

composer create-project --prefer-dist laravel/laravel proj

I get error:

[Composer\Downloader\TransportException] Content-Length mismatch, received 313522 bytes out of the expected 2060799

I checked Composer Content-Length Mismatch but this didn't resolve my problem. I tried using a VPN but the issue persists.

What is the problem and how I can resolve it?

solved my problem today (11/19/2017) without any change in config. i think that problem is in packagist.org or is in my isp. thanks

Mohammad
  • 31
  • 1
  • 3

1 Answers1

2

I also had this problem and using VPN solved my problem.

fatemeh sadeghi
  • 1,757
  • 1
  • 11
  • 14