1. 程式人生 > >解決Mac升級到Mojave後出現xcrun: error: invalid active developer path, missing xcrun的問題

解決Mac升級到Mojave後出現xcrun: error: invalid active developer path, missing xcrun的問題

今天升級mac到mojave後,終端裡升級brew的時候,彈出一行莫名其妙的錯誤:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Error: Failure while executing; `git remote set-url origin https://github.com/Homebrew/homebrew-cask` exited with 1.

Google後解決方法,重灌xcode command line:

xcode-select --install

然後再升級就沒問題了