0
1

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 3 years have passed since last update.

Composer 2.0 is now available and you should upgradeというメッセージ

Posted at

compserのアップグレード

とある案件の開発のため、新規でLaravelのインストールを実行したら
compserのアップグレードを促された件。

どうやらcomposerの1系から2系に上げなさい的なメッセージが。

You are using an outdated version of Composer. Composer 2.0 is now available and you should upgrade
訳) 古いバージョンのComposerを使用しています。 Composer 2.0が利用可能になり、アップグレードする必要があります。

そうですかという事で下記を実行

composer selfupdate
Updating to version 2.0.6 (stable channel).
   Downloading (100%)         
                                                                                                        
  [ErrorException]                                                                                      
  rename(/hoge/.cache/composer/composer-temp.phar,/usr/local/bin/composer): Permission denied 

軽くパーミッションエラーを返してくださる。
そんでこのエラーメッセージが親切そうで若干そうでもないという。

解決方法

cd ~/.cache/composer
chmod 755 composer-temp.phar
sudo mv composer-temp.phar /usr/local/bin/composer

確認

$ composer
   ______
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
                    /_/
Composer version 2.0.6 2020-11-07 11:21:17

なんて言いますか、composerって何気にこういう類の対応が多いよなぁ。

0
1
0

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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?