简体   繁体   English

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

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

This is very much a duplicate of xcode-select active developer directory error except none of those solutions worked for me.这与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

I don't even have xcode on my machine.我的机器上什至没有 xcode。

The fix for me here was that my [ XCode > Preferences > Locations > Command Line Tools ] dropdown was empty.我的解决方法是我的 [ XCode > Preferences > Locations > Command Line Tools ] 下拉列表为空。 No idea why.不知道为什么。 But after clicking it and selecting the only available option my " active developer directory " error finally went away.但是在点击它并选择唯一可用的选项后,我的“活动开发者目录”错误终于消失了。

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

在此处输入图像描述

This is very much a duplicate of xcode-select active developer directory error except none of those solutions worked for me.这与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

I don't even have xcode on my machine.我的机器上什至没有 xcode。

I had this problem because Xcode was installed in my user application directory (~/Applications) instead of /Applications.我遇到这个问题是因为 Xcode 安装在我的用户应用程序目录 (~/Applications) 而不是 /Applications 中。 From the Github link above figured out I needed to run:从上面的 Github 链接发现我需要运行:

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

(note the tilde). (注意波浪号)。 After this everything worked.在此之后一切正常。

This error completely contradicts that setting the path to /Library/Developer/CommandLineTools is the workaround for the latest XCode/MacOS combo failing to find the command line tool commands under /Application/Xcode.App/ with the default path setting.此错误与将路径设置为 /Library/Developer/CommandLineTools 是最新 XCode/MacOS 组合无法在 /Application/Xcode.App/ 下找到具有默认路径设置的命令行工具命令的解决方法完全矛盾。

暂无
暂无

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

相关问题 Xcode 构建失败并且重复需要命令行开发工具安装 - Xcode build fails and repetitive requires command line developer tools install “Python”命令需要在 macOS 12.5 上使用 Xcode 13.4.1 的命令行开发人员工具循环 - The "Python" command requires the command line developer tools loop with Xcode 13.4.1 on macOS 12.5 git(或python)命令需要命令行开发者工具 - The git (or python) command requires the command line developer tools Git 在 macOS 更新后不工作(xcrun:错误:无效的活动开发人员路径(/Library/Developer/CommandLineTools) - Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) 奇怪的错误消息:xcode-select:错误:格式错误的开发人员路径(“/Library/Developer/CommandLineTools”) - Strange error message : xcode-select: error: malformed developer path (“/Library/Developer/CommandLineTools”) “git”命令需要命令行开发工具。 您要安装吗? - The "git" command requires the command line developer tools. Would you like to install? xcode-select active developer directory 错误 - xcode-select active developer directory error ProcessException:进程异常退出:命令行调用:/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -list - ProcessException: Process exited abnormally: Command line invocation: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -list xcode开发人员工具和php - xcode developer tools and php Pod init 错误工具“xcodebuild”需要 Xcode - Pod init error tool 'xcodebuild' requires Xcode
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM