brew updateで怒られ
version確認
versionを確認しようとしたら怒られた.
MacBook-Air ~ % brew --version
Homebrew >=2.5.0 (shallow or no git repository)
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Homebrew/homebrew-core (no Git repository)
怒られた部分で検索かけたらこんな記事が出てきた.
macOSをアップデートしたら出てくるエラーらしい.確かにアップデートしたばかりだった.
MacBook-Air ~ % xcode-select --install
xcode-select: note: install requested for command line developer tools
これを実行したらなんか20minくらいかかってインストールされた.
MacBook-Air ~ % brew --version
Homebrew 3.6.3
Homebrew/homebrew-core (git revision 86ac48865b7; last commit 2022-09-27)
再度versionを確認してみたらちゃんと表示された.
怒られてた内容
MacBook-Air ~ % brew update
Error: No developer tools installed.
Install the Command Line Tools:
xcode-select --install
Error: 'git' must be installed and in your PATH!
sonoyamayuto@SonoyamanoMacBook-Air ~ % brew install portaudio
Error: No developer tools installed.
Install the Command Line Tools:
xcode-select --install
Error: 'git' must be installed and in your PATH!
Warning: portaudio 19.7.0 is already installed and up-to-date.
To reinstall 19.7.0, run:
brew reinstall portaudio
これもxcodeうんぬんな問題な気がする.
update再チャレンジ
MacBook-Air ~ % brew update
Updated 1 tap (homebrew/core).
==> New Formulae
autocorrect git-machete json2tsv tfel
dronedb go-camo snowball
==> Outdated Formulae
python@3.10 sqlite xz
You have 3 outdated formulae installed.
You can upgrade them with brew upgrade
or list them with brew outdated.
できたっぽい.
MacBook-Air ~ % brew --version
Homebrew 3.6.3
Homebrew/homebrew-core (git revision faf85486f28; last commit 2022-10-02)
last commitの日付もさっきより新しくなっている.
これにて問題解決.