$ 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/