1. 程式人生 > >MacOS 升級後出現 xcrun: error: invalid active developer path, missing xcrun

MacOS 升級後出現 xcrun: error: invalid active developer path, missing xcrun

升級macOS mojove,終端裡使用git的時候,彈出一行莫名其妙的錯誤:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

解決方法,重灌xcode command line:

xcode-select --install

如果沒有解決問題,執行以下命令

sudo xcode-select -switch /