1. 程式人生 > >xcrun: error: invalid active developer path

xcrun: error: invalid active developer path

問題

mac升級到10.12(macOS Sierra),執行命令,出現如下錯誤:

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

解決辦法

安裝xcode-select

# xcode-select --install

跳出對話方塊,安裝即可。

如報錯

Developer Apple上手動下載對應的Command Line Tools 安裝即可。

參考

http://www.ttlsa.com/linux/mac-git-xcrun-error-invalid-active-developer-path/

https://blog.csdn.net/lucky9322/article/details/79036877