mac報錯: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun 場景: 使用goland debug模式運行go代碼main方法時,報以上錯誤,初步分析是xcode 組件缺失了 包括一些其他場景如運行git命令等也有可能出現此錯誤 解決方法: 打開命令終端運行 xcode-select --install 回車后,系統彈出下載xcode組件,點擊確認,下載完成后即可。 mac中很多軟件都需要依賴xcode的先關組件。