I'm trying to install Node.js with homebrew on OS X but I'm running into a few issues and I'm not quite sure how to fix them. When I run brew doctor
I get the following output:
Warning: Python is installed at /Library/Frameworks/Python.framework
Homebrew only supports building against the System-provided Python or a
brewed Python. In particular, Pythons installed to /Library can interfere
with other software installs.
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
node
Warning: You have uncommitted modifications to Homebrew
If this a surprise to you, then you should stash these modifications.
Stashing returns Homebrew to a pristine state but can be undone
should you later need to do so for some reason.
cd /usr/local/Library && git stash && git clean -d -f
Error: Homebrew doesn't know what compiler versions ship with your version
of Xcode (5.1). Please `brew update` and if that doesn't help, file
an issue with the output of `brew --config`:
https://github.com/Homebrew/homebrew/issues
Note that we only track stable, released versions of Xcode.
Thanks!
I tried to run brew link node
and got the following message:
Linking /usr/local/Cellar/node/0.10.26... Warning: Could not link node. Unlinking...
Error: Could not symlink file: /usr/local/Cellar/node/0.10.26/lib/dtrace/node.d
Target /usr/local/lib/dtrace/node.d already exists. You may need to delete it.
To force the link and overwrite all other conflicting files, do:
brew link --overwrite formula_name
To list all files that would be deleted:
brew link --overwrite --dry-run formula_name
So then I tried to run brew link --overwrite node
and got the following error:
Linking /usr/local/Cellar/node/0.10.26... Warning: Could not link node. Unlinking...
Error: Permission denied - /usr/local/lib/dtrace/node.d
I am now stuck and not really sure what to do. Any help would be greatly appreciated.
I got this issue solved by running:
sudo chown -R `whoami` /usr/local
To resolve the permission issue try
sudo brew link --overwrite node
Note that unless you have specific reasons to install node using homebrew, I would recommend to just go to http://nodejs.org/, download the Mac OS installer and let it do everything for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With