xcrun: error: active developer path

让人想犯罪 __ 提交于 2020-01-30 07:26:50

执行git clone https://github.com/xxxxx/mbstore_shell_full.git后报错:

xcrun: error: active developer path ("/Users/ng/Downloads/Xcode.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.

尝试使用(无效,仍旧报错):

sudo xcode-select --switch path/to/Xcode.app // path代入Xcode目录地址

以及使用(无效,仍旧报错):

xcode-select --install

报错:

xcode-select: error: command line tools are already installed, use "Software Update" to install updates

尝试执行Software Update也报错,这边应该只是提醒我们用更新的命令,而不是直接输入Software Update

有人说以下方法有效(试了重新下载,还是无效,git version报错):

rm -rf /Library/Developer/CommandLineTools
xcode-select --install

 

真正有效的来了:

x-code更新后,svn 命令(eg: svn  update)不好使了,执行下列命令

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
$ git version

git version 2.20.1 (Apple Git-117)

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!