[英]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.