1. 程式人生 > >MacOS 升級後,出現的 xcrun: error: invalid active developer path (/Library/...), missing xcrun at: /Library/Developer/.../bin/xcrun 錯誤

MacOS 升級後,出現的 xcrun: error: invalid active developer path (/Library/...), missing xcrun at: /Library/Developer/.../bin/xcrun 錯誤

最近Mac升級了 OS 之後

git 使用時會出現錯誤訊息

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

解決方法:

重灌 xcode

xcode-select --install

問題應該就會解決

如果還是不行,可以試試

sudo xcode-select -switch /
如果你喜歡我們的文章內容,請在這裡按個讚