macOS Catalinaにアップデートしたらgccが使えなくなった。
結論:xcode-select --install
をターミナルで実行する
詳細
具体的なエラーはxcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
と出た。
xcodeの問題かと思ってxcodeのアップデートをしようと考えたが、アップデートさえできない。
調べたら、xcode-selectがxcurnを管理しているらしい。
xcode-selectはデベロッパディレクトリの場所を管理しているらしい。
感想
xcode-selectを初めて聞いた。
デベロッパディレクトリも初めて聞いた。
もっと勉強しなきゃ。
参照
https://qiita.com/nishina555/items/e23d73067a5cac182a63
https://qiita.com/gooichi/items/017cf84ec52726ccd785