我把Xcode8删掉,留下Xcode9,结果Git用不了了。
我想克隆远程一个东西,报错:
xcrun: error: active developer path ("/Applications/Xcode8.app/Contents/Developer") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.
意思就是Xcode8.app/Contents/Developer这个文件夹不存在了(因为我已经删掉了),要用sudo xcode-select --switch path/to/Xcode.app
这种命令来指定一个你想要用命令行开发工具的Xcode。
最终解决方法:sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
。
要切换到的路径,也就是把错题提示中已经不存在的那个路径/Applications/Xcode8.app/Contents/Developer
中的 8
给去掉就行了。
网友评论