1. 問題の説明
Xcode をアンインストールしたり、Xcode をアップグレードしたりすると、Clion のコンパイラ gcc が突然使用できなくなり、gcc をインストールしようとすると次の問題が発生しました。
xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist
2、解決策
次の 3 つの手順を実行します。
sudo xcode-select -r
sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools
xcode-select -p