[英]Xcode build fails and repetitive requires command line developer tools install
[英]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-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.