tool: xcode-select

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

在这里插入图片描述

发布了240 篇原创文章 · 获赞 35 · 访问量 11万+

猜你喜欢

转载自blog.csdn.net/paulkg12/article/details/105348692
今日推荐