Mac升級了系統 在idea 中發現Git居然壞了。。。
完整的錯誤信息
Сannot Run Git
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
看了下Git命令能否正常使用 命令行git --help 依然報和上面同樣的錯誤
在查找了下git的安裝目錄
whereis git
/usr/bin/git
可以正確輸出git安裝位置
是不是Git安裝包出問題了 在次使用 brew install git
Error: The following formula:
git
cannot be installed as a binary package and must be built from source.
Install the Command Line Tools:
xcode-select --install
Error: Git must be installed and in your PATH!
Error: The following formula:
git
cannot be installed as a binary package and must be built from source.
Install the Command Line Tools:
xcode-select --install
這次錯誤居然給了提示 xcode-select --install
然後使用 xcode-select --install 進行安裝 成功解決
控制檯使用 git --help命令 看到成功輸出內容
解決方法 使用 xcode-select --install 進行安裝 安裝完成重啓idea