mac更新系統后Git不能用,提示missing xcrun at


今天更新了mac系統,然后就踩了這個坑。

啟動AndroidStudio 右上角提示:

can't start git: /usr/bin/git probably the path to git executable is not valid . `fix it`.
  • 1
  • 2

點擊fix it后 點擊最上邊路徑地址后邊的test提示:

errors while executing git -- version. exitCode=1 errors: xcrun: error : invalid active developer path(/library/developer/commandlinetools),missing xcrun at: /library/developer/commandlinetools.usr/bin/xcrun
  • 1
  • 2
  • 3

找了一圈。。很多開發者都遇到過這問題。據說蘋果每個版本的更新都會有這樣的問題,原因是每次安裝新的更新后,Xcode都被卸載了。。。。不扯別的說解決方案。


通過終端重新安裝的Xcode命令行工具使用(其實這里安裝的是Command Line Tools,Command Line 
Tools是在Xcode中的一款工具)

xcode-select --install


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM