我已经安装了命令行工具:
$ xcode-select --print-path
/Library/Developer/CommandLineTools
但是,当尝试使用时xcodebuild
,出现以下错误:
$ /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,而仅安装命令行工具,就可以使用它。小牛有可能这样做吗?我该如何运作?
注意:这是在全新安装的Mavericks上的。
更新:只是为了显示,我确实安装了命令行工具:
$ 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
node-gyp
因为这就是问题的根源:github.com/TooTallNate/node-gyp/issues/341
xcode-select --install
。安装了Xcode的xcode-select --print-path
照片/Applications/Xcode.app/Contents/Developer