繁体   English   中英

工具“xcodebuild”需要 Xcode,但活动开发者目录“/Library/Developer/CommandLineTools”是命令行工具实例

[英]tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

这与xcode-select 活动开发者目录错误非常相似,但这些解决方案都不适合我。

$ 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。

我的解决方法是我的 [ XCode > Preferences > Locations > Command Line Tools ] 下拉列表为空。 不知道为什么。 但是在点击它并选择唯一可用的选项后,我的“活动开发者目录”错误终于消失了。

Mac OS 12.3.1 | 日期:22 年 5 月 4 日

在此处输入图像描述

这与xcode-select 活动开发人员目录错误非常相似,但这些解决方案都不适合我。

$ 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。

我遇到这个问题是因为 Xcode 安装在我的用户应用程序目录 (~/Applications) 而不是 /Applications 中。 从上面的 Github 链接发现我需要运行:

sudo xcode-select -s ~/Applications/Xcode.app/Contents/Developer

(注意波浪号)。 在此之后一切正常。

此错误与将路径设置为 /Library/Developer/CommandLineTools 是最新 XCode/MacOS 组合无法在 /Application/Xcode.App/ 下找到具有默认路径设置的命令行工具命令的解决方法完全矛盾。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM