LoginSignup
6
4

More than 1 year has passed since last update.

macOS Montereyにアップデートしたことによっての不具合

Last updated at Posted at 2021-11-03


Homebrewでのインストールをする必要がある
https://qiita.com/zaburo/items/29fe23c1ceb6056109fd


Checking for sudo access (which may request your password).
が出たときにパスワードを入力

$ brew -v

を入力してHomebrewがあるか確認

$ php -v

を入力すると -bash: php: command not foundと出現したため

$ brew search php

で、インストールできるPHPのバージョンを確認
https://qiita.com/5ryo_ryo5/items/f38edd2b5ed3e30e7760


To start php@7.4: brew services start php@7.4と出現したため

bash_profile
$ brew services start php@7.4

と入力

PATH="/usr/local/opt/php@7.4/bin:$PATH

と入力

 $ sudo nano ~/.bash_profile

を入力をパスワード入力
sudo: source: command not foundと出現した為

$ source ~/.bash_profile

と入力

 $ php -v 

でphpのバージョン確認

$ php -v

PHP 7.4.25 (cli) (built: Oct 23 2021 18:05:05) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.25, Copyright (c), by Zend Technologies
で確認完了

Homebrewとphpインストール完了
ComposerとLaravelをインストールが可能になった。

まとめ

このことからの学びは
今の作業途中にOSをアップデートしないこと
macOS Montereyはパッケージ化になっていてphpがなくなっているためphpとHomebrewのインストールが必要。

参考URL:
https://qiita.com/zaburo/items/29fe23c1ceb6056109fd
https://qiita.com/5ryo_ryo5/items/f38edd2b5ed3e30e7760

6
4
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
6
4