xcrun:错误:活动的开发人员路径("/Applications/Xcode.app/Contents/Developer")不存在 [英] xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist

查看:2102
本文介绍了xcrun:错误:活动的开发人员路径("/Applications/Xcode.app/Contents/Developer")不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用brew和git时遇到了xcode问题:

I'm having xcode issues when I try to use brew and git:

xcrun:错误:活动的开发人员路径("/Applications/Xcode.app/Contents/Developer")不存在,请使用xcode-select --switch path/to/Xcode.app指定要用于命令行开发人员工具的Xcode(或参阅man xcode-select)

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)

我可以键入xcode-select,它表明该命令存在.当我键入xcode-select -p时,它会显示:

I can type xcode-select and it shows that the command exists. When I type xcode-select -p it shows:

/Applications/Xcode.app/Contents/Developer

/Applications/Xcode.app/Contents/Developer

但是当我执行which xcode-select时,它会给我:

but when I do which xcode-select, it gives me:

/usr/bin/xcode-select

/usr/bin/xcode-select

我尝试使用命令开关并通过Apple Developer网站再次安装,但是到目前为止,这些选项都不起作用...如何解决此问题?

I've tried to use the command switch and install again via Apple Developer site but none of these options have work so far... How can I fix this?

推荐答案

我尝试了一下,但没有成功,但找到了答案.我只需要重置开发者的路径即可:

I tried that and it didn't work but I found the answer. I just had to reset the developer's path:

$ sudo xcode-select --reset

现在一切正常

这篇关于xcrun:错误:活动的开发人员路径("/Applications/Xcode.app/Contents/Developer")不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆