-
-
Save Critter/c52dc9257f40ded4dfc1 to your computer and use it in GitHub Desktop.
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$ |
Thanks!
Thanks man!
still i got the below error message
kangs-mbpi:~ kangs$ brew link node
Linking /usr/local/Cellar/node/4.1.1...
Error: Could not symlink include/node/ares.h
Target /usr/local/include/node/ares.h
already exists. You may want to remove it:
rm '/usr/local/include/node/ares.h'
To force the link and overwrite all conflicting files:
brew link --overwrite node
To list all files that would be deleted:
brew link --overwrite --dry-run node
kangs-mbpi:~ kangs$ brew link --overwrite node
Linking /usr/local/Cellar/node/4.1.1...
Error: Could not symlink share/systemtap/tapset/node.stp
/usr/local/share/systemtap/tapset is not writable.
kangs-mbpi:~ kangs$ sudo brew link --overwrite 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.
kangs-mbpi:~ kangs$ which brew
/usr/local/bin/brew
**
kangs-mbpi:~ kangs$ sudo chown -R root /usr/local/bin/brew
kangs-mbpi:~ kangs$ sudo brew link --overwrite node
Linking /usr/local/Cellar/node/4.1.1... 43 symlinks created
**
until you give root as the owner of brew the issue is not resolved..
Thank you so much kpassoubady, this really solved my problem.
@kpassoubady - I just had a similar issue. I received the following error when installing node on a fresh homebrew (I recently wiped my mac and reset it back to factory, and am setting up my dev tools).
Error:
Error: Could not symlink share/systemtap/tapset/node.stp
This was the only error I was getting, and it wouldn't link node. I looked at permissions on the share directory, then on systemtap, then on tapset. I noticed the tapset
directory was still owned by root. Did the homebrew install miss this? I uninstalled node with brew. I cd'd up to /usr/local
and ran the following command:
sudo chown -R $(whoami) /usr/local/share
tapset is now owned by my user, and node installed without issues :) Hopefully that is the last of my issues. My only conclusion, is that somehow homebrew missed setting the permissions recursively on the share directory.
Different directory, same error. Fix worked. Thank you.
@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!
what does sudo chown -R
whoami
/usr/local/include/node mean?