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)
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 meit 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)
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:
it works for me too
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.
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
For proxy issues, try: https://gist.github.com/naderman/377e40c1c76e0fe8b905c1a333c4112a
Details: https://twitter.com/naderman/status/1029839134070853637
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.
I tried all previous sollution and nothing happened but finally this worked for me
This helped me, Thank you ❤️.
Worked (I am using cPanel Terminal)
This was a solution for me
@SV-ZeroOne This might be the problem: https://twitter.com/packagist/status/1156148973738110978
This work for me also
the composer clear-cache Solution Worked For Me , Thanks to @johnabelardom
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.