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

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

问题描述

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

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

xcrun: error: active developer path ("/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天全站免登陆