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

Homebrewを使ってローカルのphpバージョンを設定する場合

0
Last updated at Posted at 2021-03-10

ローカルでcomposer updateしたくって、ローカルのphpのバージョン古いよ?って言われて、困ったので調べた内容記して起きますl.

1. Homebrewに下記をインストール

brew install php # 入れておかないと怒られるので追加しておく
brew install php@7.4

2. Homebrewにlocalのphpをphp@7.4へ切り替える(※今回は7.4のところは任意のバージョンで)

brew unlink php && brew link --overwrite --force php@7.4

3. 上記のcommandで出てきた案内通りに~/.zshrcへechoで指定のパスを追加

4.下記コマンドで、~/.zshrcの内容を反映

source ~/.zshrc
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?