xcrun: error: invalid active developer path (/Library/Developer/CommandLineT
更新mac os后無法運行git,gcc等命令,出現missing xcrun錯誤.
這是因為更新系統后會卸載xcode,重新安裝后會缺失xcode的命令行工具(command line tools),所以導致部分工具無法在終端運行。解決方法為運行以下命令:
xcode-select --install
並下載xcode命令行工具即可。 --->並不行。
“xcode-select --install不能下載該軟件,因為目前bai不可在du軟件服務器上使用它……”,這是由於zhixcode的命令行工dao具無法安裝不能安裝該軟件 因為當前無法從軟件更新服務器獲得的錯誤。
相信很多人在使用Mac的時候也跟我一樣碰到過跟我一樣的問題“xcode-select --install不能下載該軟件,因為目前不可在軟件服務器上使用它……”,這是由於xcode的命令行工具無法安裝不能安裝該軟件 因為當前無法從軟件更新服務器獲得的錯誤。
具體報錯內容如下:
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! xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun Error: The following formula:python cannot be installed as a binary package and must be built from source. Install the Command Line Tools:xcode-select --install
碰到問題提了當然是要想辦法解決了,這時候我在網上找了很多教程有些說是路徑的問題,而我試了很多都沒有找到一個好的解決辦法,最終在國外的一個網站下面的評論上找到了解決辦法。
解決辦法如下:
1、打開Apple的開發者下載:https://developer.apple.com/download/more/;
2、中間需要登錄下,登錄完成后在左邊的搜索框中搜索Command Line Tools然后搜索;
3、將適合你Mac電腦版本的那個下載下來安裝好即可;
4、然后再去安裝homebrew即可順利安裝。