1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【laravleエラー】Composer\Downloader\TransportException / Installation failed, reverting ./composer.json to its original content

Last updated at Posted at 2020-06-12

久々にlaravelプロジェクト作ろうとするとエラーになってハマった。

環境

mac os
php7系
composer:1.10.7
laravel5かlaravel7

結論

composer入れ直した。

全消し
~/.composer
消して入れ直す。
/bin/local/composer

インストールは公式を参照

現象

キーを設定し直したり
https://composer.github.io/pubkeys.html

環境設定直したり
色々やっても直らなかった。

30分くらい調べて、一応公式サーバー落ちてないかtwitterでも調べて、
どうにも直らないので入れ直したら動いた。

bash
composer create-project --prefer-dist laravel/laravel web "5.5.*"
Creating a "laravel/laravel" project at "./web"
Installing laravel/laravel (v5.5.28)
  - Installing laravel/laravel (v5.5.28): Loading from cache
Created project in /Users/hoge/Projects/sample/entame_db/web
> @php -r "file_exists('.env') || copy('.env.example', '.env');"
Loading composer repositories with package information
Updating dependencies (including require-dev)

                                                                                                                                                 
  [Composer\Downloader\TransportException]                                                                                                       
  The "https://packagist.jp/p/symfony/polyfill-mbstring%2463622136eb14e873755fe5fa81cb1bdbd6b9eaaa07fdd33f7ab8338066d34bd1.json" file could not  
   be downloaded (HTTP/1.1 404 Not Found)                                                                                                        
                                                                                                                                                 

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]

bash
composer global require laravel/installer
Changed current directory to /Users/hoge/.composer
Using version ^3.1 for laravel/installer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)

Installation failed, reverting ./composer.json to its original content.

                                                                                                                                                 
  [Composer\Downloader\TransportException]                                                                                                       
  The "https://packagist.jp/p/symfony/polyfill-intl-idn%2464369d463d5ebb448bfcb1dacd2a849eec4d5b3ccbfd1936454ec1690c27a23b.json" file could not  
   be downloaded (HTTP/1.1 404 Not Found)                                                                                                        
                                                                                                                                                 

require [--dev] [--prefer-source] [--prefer-dist] [--fixed] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

1
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?