这是一个非常重复的xcode-select active developer directory error除了没有这些解决方案为我工作。
$ sudo xcode-select --reset
$ sudo xcodebuild -license accept
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
$ sudo xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
我的机器上甚至没有xcode。
5条答案
按热度按时间mctunoxg1#
这里我的修复是我的[ XCode >首选项>位置>命令行工具]选项卡是空的。不知道为什么。但在点击它并选择唯一可用的选项后,我的“* 活动开发人员目录 *”错误终于消失了。
Mac OS 12.3.1|日期:2022年5月4日
rkttyhzu2#
我遇到这个问题是因为Xcode安装在我的用户应用程序目录(~/Applications)而不是/Applications。从上面的Github链接中发现我需要运行:
(note波浪号)。在这之后,一切都工作了。
ckx4rj1h3#
如果你正在寻找一个简单的命令来解决这个问题,并且你的xcode安装在默认位置(
/Applications/Xcode.app
),你可以用这个命令来解决这个问题:mu0hgdu04#
在安装Xcode beta时,我也遇到了“xcode-select active developer directory error”。在你的情况下,你甚至不需要完整的Xcode,命令行工具应该可以正常工作。阅读此Github issue
2nc8po8w5#
这个错误完全矛盾的是,设置路径到/Library/Developer/CommandLineTools是最新的XCode/MacOS组合无法找到命令行工具命令下的命令行工具命令与默认路径设置。