xcrun: エラー: アクティブな開発者パス (「/Applications/Xcode.app/Contents/Developer」) が存在しません

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

おすすめ

転載: blog.csdn.net/qq_33833327/article/details/124546688