composer: Composer file could not be downloaded (404 not found)

I tyring to install Laravel

Output of composer diagnose:

d:\web>composer diag Checking platform settings: OK Checking git settings: OK Checking http connectivity to packagist: OK Checking https connectivity to packagist: OK Checking HTTP proxy: OK Checking HTTP proxy support for request_fulluri: OK Checking HTTPS proxy support for request_fulluri: OK Checking github.com oauth access: OK Checking disk free space: OK Checking pubkeys: Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 **** 723 4E5D42D0 84A14642 Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B **** 8C AD90147D AFE50952 OK Checking composer version: OK Composer version: 1.6.2 PHP version: 7.2.1 PHP binary path: D:\php-7.2.1-nts-Win32-VC15-x86\php.exe

When I run this command:

composer global require “laravel/installer”

I get the following output:

[Composer\Downloader\TransportException] The “https://packagist.org/p/symfony/console%2433f24f3dbe55cff57fe06a5fa93b a0bbe3ae3b259e2c5b7d051da0238769fa0f.json” file could not be downloaded (HT TP/1.1 404 Not Found)

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 49 (1 by maintainers)

Most upvoted comments

Same problem for me - but this was cleared by:

composer clear-cache

Can you try

composer clear-cache

then

composer -vvv

after that try running the install command for laravel, it worked for me though

composer clear-cache didn’t work for me

it seems that there are some network issues from time to time on the main server https://packagist.org

i tried one of the mirrors as a temporary workaround:

composer config -g repo.packagist composer https?://packagist.jp

it was pretty slow, but worked finally

having the same problem.

First I try the command “composer clear-cache”. It still not working. Then I try the command “composer dump-autoload”. It works for me.

Yes that happened for me too! To know the current version and update details:

composer diagnose

If you spot there: Checking github.com oauth access: The oauth token for github.com seems invalid, run “composer config --global --unset github-oauth.github.com” to remove it

Just remove it. And try install again. In my case I was getting 404 errors because an outdated key was there (Although it expected other error with that instead of 404)

Can you try

composer clear-cache

then

composer -vvv

after that try running the install command for laravel, it worked for me though

It works for me.

There are many reasons for this error. One additional thing to check is that, if you’re using private repos with user/pass, you might not have the correct permissions.

Check:

  • auth.json file, check credentials
  • if necessary, set up new credentials and try again

Can you try

composer clear-cache

then

composer -vvv

after that try running the install command for laravel, it worked for me though

it works for me too

Yes that happened for me too! To know the current version and update details:

composer diagnose

If you spot there: Checking github.com oauth access: The oauth token for github.com seems invalid, run “composer config --global --unset github-oauth.github.com” to remove it

Just remove it. And try install again. In my case I was getting 404 errors because an outdated key was there (Although it expected other error with that instead of 404)

This one helped me for some situation. I think token is expired and it couldn’t connect to git repo due to this reason. But after removing it, it asked me for new token and I generated new one and it fixed the problem. Thank you.

Hello, I recently encountered the same following error when trying to composer require seostats/seostats package. Was first getting this error [Composer\Downloader\TransportException] The "https://packagist.org/p/provider-2019-04%244380046a2dfa549bfcf196bfc2c1a5cca9d58c63fb9b8e836367bfe2c01f062b.json" file could not be downloaded (HTTP/1.1 404 Not Found)

Then tried a composer clear-cache Now getting this error [Composer\Downloader\TransportException] Content-Length mismatch, received 551423 bytes out of the expected 2019004

Can anybody explain why this is happening?

Here is my composer diagnose results Checking platform settings: OK Checking git settings: OK Checking http connectivity to packagist: OK Checking https connectivity to packagist: OK Checking github.com rate limit: OK Checking disk free space: OK Checking pubkeys: Checking composer version: OK Composer version: 1.8.6 PHP version: 7.2.20 PHP binary path: /opt/cpanel/ea-php72/root/usr/bin/php

Changed my composer default repos to this and it solved the content-length mismatch errors and I was able to successfully install my package. composer config -g repo.packagist composer https://packagist.org composer config -g github-protocols https ssh

This issue was never fixed.

nano ~/.composer/auth.json change ==> “github-oauth”: { “github.com”: “ghp_[YOUR-PERSONAL-TOKEN]” } to ==> delete the github.com entry under “github-oauth”: {} That’s it.

composer clear-cache didn’t work for me

it seems that there are some network issues from time to time on the main server https://packagist.org

i tried one of the mirrors as a temporary workaround:

composer config -g repo.packagist composer https?://packagist.jp

it was pretty slow, but worked finally

I tried all previous sollution and nothing happened but finally this worked for me

Can you try

composer clear-cache

then

composer -vvv

after that try running the install command for laravel, it worked for me though

This helped me, Thank you ❤️.

composer clear-cache didn’t work for me

it seems that there are some network issues from time to time on the main server https://packagist.org

i tried one of the mirrors as a temporary workaround:

composer config -g repo.packagist composer https?://packagist.jp

it was pretty slow, but worked finally

Worked (I am using cPanel Terminal)

Can you try

composer clear-cache

then

composer -vvv

after that try running the install command for laravel, it worked for me though

This was a solution for me

Can you try

composer clear-cache

then

composer -vvv

after that try running the install command for laravel, it worked for me though

This work for me also

the composer clear-cache Solution Worked For Me , Thanks to @johnabelardom

Can you try

composer clear-cache

then

composer -vvv

after that try running the install command for laravel, it worked for me though

This worked for me aswell

That is weird. I will check that too

Sent from Yahoo Mail for iPhone

On Tuesday, January 29, 2019, 12:57 PM, Miraz Mac notifications@github.com wrote:

I didn’t find any solution. But I found when the problem occurs. It seems the problem only occurs when I’m using my broadband connection IP. If I use mobile data via hotspot everything seems to work fine. But for some reason won’t work on my broadbrand IP.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.