无法在安装了命令行工具的 Mavericks 上使用 xcodebuild [英] Unable to use xcodebuild on Mavericks with Command Line Tools installed
问题描述
我已经安装了命令行工具:
I have installed the Command Line Tools:
$ xcode-select --print-path
/Library/Developer/CommandLineTools
但是,当任何尝试使用 xcodebuild
时,我会收到以下错误:
However, when anything tries to use xcodebuild
, I get the following error:
$ /usr/bin/xcodebuild
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
在 Mountain Lion 上,无需安装整个 Xcode 即可使用它,而无需安装命令行工具.在小牛队可以做到这一点吗?我怎样才能让它工作?
On Mountain Lion it was possible to use this without installing the whole of Xcode, rather just the Command Line Tools. Is it possible to do this on Mavericks? How can I get it working?
注意这是对 Mavericks 的全新安装.
N.B. This is on a clean install of Mavericks.
更新:只是为了说明,我确实安装了命令行工具:
Update: just to show, I do have the Command Line Tools installed:
$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
推荐答案
我知道这是一个迟到的答案,但在我的情况下,这个命令解决了这个问题:
I know that this is a late answer, but in my case this command solved the issue:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
这篇关于无法在安装了命令行工具的 Mavericks 上使用 xcodebuild的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!