$ sudo rm -rf /Applications/Xcode.app
這之後,運行git,報錯了
$ git
xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer/") does not exist, use xcode-select --switch path/to/Xcode.app
to specify the Xcode that you wish to use for command line developer tools (or see man xcode-select
)
solve:
原因是Xcode不存在了。安裝一個試試
$ xcode-select --install
xcode-select: error: command line tools are already installed, use “Software Update” to install updates
如是,查看提示後,切換達到另外一個環境OK
$ sudo xcode-select --switch /Library/Developer/CommandLineTools/