Created
February 13, 2015 21:21
-
-
Save Critter/c52dc9257f40ded4dfc1 to your computer and use it in GitHub Desktop.
Install and link node with brew
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Critter:lib critter$ brew install node | |
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/node-0.12.0.yosemite.bottle.1.tar.gz | |
######################################################################## 100.0% | |
==> Pouring node-0.12.0.yosemite.bottle.1.tar.gz | |
==> Caveats | |
If you update npm itself, do NOT use the npm update command. | |
The upstream-recommended way to update npm is: | |
npm install -g npm@latest | |
Bash completion has been installed to: | |
/usr/local/etc/bash_completion.d | |
Error: The `brew link` step did not complete successfully | |
The formula built, but is not symlinked into /usr/local | |
Could not symlink include/node/android-ifaddrs.h | |
/usr/local/include/node is not writable. | |
You can try again using: | |
brew link node | |
==> Summary | |
🍺 /usr/local/Cellar/node/0.12.0: 2196 files, 25M | |
Critter:lib critter$ brew link node | |
Linking /usr/local/Cellar/node/0.12.0... | |
Error: Could not symlink include/node/android-ifaddrs.h | |
/usr/local/include/node is not writable. | |
Critter:lib critter$ sudo brew link node | |
Error: Cowardly refusing to `sudo brew link` | |
You can use brew with sudo, but only if the brew executable is owned by root. | |
However, this is both not recommended and completely unsupported so do so at | |
your own risk. | |
Critter:lib critter$ sudo chown -R `whoami` /usr/local/include/node | |
Critter:lib critter$ brew link node | |
Linking /usr/local/Cellar/node/0.12.0... 43 symlinks created | |
Critter:lib critter$ |
@WadeShuler I'm struggling for almost a full day, and thanks for it (: I was also stucked where you were. It's probably standard Mac configuration.
Great hint, thanks a lot. Worked for me!
Thanks for sharing. For what it's worth, here's a more readable version
$ brew install node
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/node-0.12.0.yosemite.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring node-0.12.0.yosemite.bottle.1.tar.gz
==> Caveats
If you update npm itself, do NOT use the npm update command.
The upstream-recommended way to update npm is:
npm install -g npm@latest
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink include/node/android-ifaddrs.h
/usr/local/include/node is not writable.
You can try again using:
brew link node
==> Summary
/usr/local/Cellar/node/0.12.0: 2196 files, 25M
$ brew link node
Linking /usr/local/Cellar/node/0.12.0...
Error: Could not symlink include/node/android-ifaddrs.h
/usr/local/include/node is not writable.
$ sudo brew link node
Error: Cowardly refusing to `sudo brew link`
You can use brew with sudo, but only if the brew executable is owned by root.
However, this is both not recommended and completely unsupported so do so at
your own risk.
$ sudo chown -R `whoami` /usr/local/include/node
$ brew link node
Linking /usr/local/Cellar/node/0.12.0... 43 symlinks created
Thanks, worked for me!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Different directory, same error. Fix worked. Thank you.