If you are like me who has no need for a full Xcode installation just to get the command line tools, chances are you are using one of these: Apple’s Command Line Tools or the osx-gcc-installer.
Recently Node.js has made some changes so that it no longer installs on OS X via homebrew if you don’t have Xcode installed.
If you run brew install nodejs
, you will get the following error:
\> Error: Failed executing: make install (node.rb:28)
And if you run brew install -v nodejs
, you will discover this line:
\> xcode-select: Error: No Xcode is selected. Use xcode-select -switch , or see the xcode-select manpage (man xcode-select) for further information.
The fix? It’s actually quite easy, simply do:
sudo xcode-select --switch /usr/bin
And voila! You can now install Node.js just fine. :)
Enjoy what you are reading? Sign up for a better experience on Persumi.