
昨晚剛安裝了 OS X 10.11,我驚訝地發現我的 Bash 終端執行了以下操作:
$ git
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
以前版本的 XCode 沒有轉移到新作業系統。我嘗試全新安裝 Git,但在 Bash 中仍然出現相同的 XCode 故障。
這有充分的理由嗎?
答案1
對我來說,這是一個解決方案:
xcode-select --install
安裝完成後,git又開始工作了。
答案2
升級到El-Capitan後遇到這個問題
xcode-select --install
即使在“查找軟體”並下載之後也對我不起作用。我沒有安裝 Xcode.app(不想安裝),所以我透過下載修復了它命令列工具從https://developer.apple.com/downloads/(需要 Apple 登入)並手動安裝。
安裝後我可以git
再次運行命令