Problems on Mavericks with only Command Line Tools installed
See original GitHub issueI have installed the Command Line Tools:
$ xcode-select --print-path
/Library/Developer/CommandLineTools
However, when anything tries to use node-gyp
, I get the following error:
$ npm install bcrypt
npm http GET https://registry.npmjs.org/bcrypt
npm http 304 https://registry.npmjs.org/bcrypt
npm http GET https://registry.npmjs.org/bindings/1.0.0
npm http 304 https://registry.npmjs.org/bindings/1.0.0
> bcrypt@0.7.7 install /Users/Oliver/Development/sbscribe/node_modules/bcrypt
> node-gyp rebuild
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
gyp: Error 1 running xcodebuild
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:424:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Darwin 13.0.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/Oliver/Development/sbscribe/node_modules/bcrypt
gyp ERR! node -v v0.10.21
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0
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?
N.B. This is on a clean install of Mavericks.
Issue Analytics
- State:
- Created 10 years ago
- Comments:78 (6 by maintainers)
Top Results From Across the Web
Unable to use xcodebuild on Mavericks with Command Line ...
It appears that OSX has changed xcodebuild to require XCode to be installed, where before it functioned properly with only the OSX Command...
Read more >[Solved]-Failed to install command line tools on OSX Mavericks
Install them from here. You must be a registered developer. Other solution is: in xcode click Xcode>Open Developer Tool>More Developer Tools.
Read more >How can I install the Command Line Tools completely from the ...
It appears to use /System/Library/CoreServices/Install Command Line Developer Tools.app to do this. I would like to use the same mechanism that ...
Read more >How to Install Command Line Tools in Mac OS X (Without ...
The Command Line Tool package gives Mac terminal users many commonly used tools, utilities, and compilers, including make, GCC, clang, perl, svn ...
Read more >Installing Command Line Tools automatically on Mavericks
In Mavericks, the Xcode Command Line Tools can be downloaded from the ADC downloads page like with previous versions. Now, though, they can ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
To re-iterate @Poohblah’s solution:
The Error
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
The Solution
Run
which xcodebuild
in the terminal. If it gives no output, continue to step 2. If it gives output, then this solution will not work for you.Create a file
/usr/local/bin/xcodebuild
. In that file, use your favourite editor to add the contents:Save that file, and exit your editor.
Give the file the correct permissions by running
sudo chmod a+x /usr/local/bin/xcodebuild
You’re done! Re-run he command that caused the error.
@ilei 42.