I've literally searched everything on web. But I could not find the solution for the error node-0.8.8 already installed, it's just not linked
. Is it related to a path file issue?

- 25,161
- 11
- 89
- 121

- 5,338
- 12
- 55
- 78
-
Can you provide some context to what you are trying to do? – Brad Sep 30 '12 at 18:12
-
I've downloaded node 0.5 and trying to update to latest version. I'm using 'brew install node'. It installs the 0.8.8 version but after I type "node --version" it says the older version. – Ali Sep 30 '12 at 18:14
8 Answers
Execute this list of commands in this particular order:
sudo brew uninstall node
brew update
brew upgrade
brew cleanup
brew install node
sudo chown -R $(whoami) $(brew --prefix)
brew link --overwrite node
brew postinstall node

- 7,859
- 3
- 40
- 53

- 5,123
- 4
- 17
- 24
After you've run brew upgrade
to update node to the latest version, run brew doctor
to see what potential problems there are. It might tell you that node is unlinked, in which case, running brew link node
will link it. (You might need to first run brew unlink node
)
-
9I keep getting this error--- Could not symlink include/node/android-ifaddrs.h /usr/local/include/node is not writable --- any ideas? – SleepsOnNewspapers Jun 16 '15 at 19:54
-
2@SleepsOnNewspapers http://developpeers.com/blogs/fix-for-homebrew-permission-denied-issues – ironicaldiction Nov 03 '15 at 05:46
-
-
I got the same error today and it told me that Node was not properly linked and there were unexpected header files as well.
When I tried to reinstall node, It told me that it was already installed, just not linked.
Warning: /usr/local/include isn't writable
/usr/local/bin/node already exists. Remove it
Solution
To fix this, I took ownership of it by using:
sudo chown -R `whoami` /usr/local/
Then I force linked all files by using:
brew link --overwrite node
After that I did the post install routine with:
brew postinstall node
Then I checked if node was properly installed with:
node -v
I received output v5.1.0
and It was fixed :). Hope this helps.
This may not be the perfect fix out there since I have started dabbling with node and homebrew just 10 minutes ago but it did the job for me.

- 5,548
- 6
- 41
- 54
Your old version of Node 0.5 was probably not installed with Homebrew (or Homebrew's script changed in the large gap between the 0.5 beta releases to the 0.8 stable releases (the 0.6 and 0.7 releases in-between).
Both Homebrew and the official Node installer try to install to /usr/local/bin
so I'd recommend starting by simply deleting /usr/local/bin/node
, /usr/local/bin/npm
, and /usr/local/lib/node
and try again.

- 49,085
- 60
- 166
- 233
hardcorepunk's answer worked. However, we can no longer chown /usr/local
in High Sierra. So, execute the commands in this order:
sudo brew uninstall node
brew update
brew upgrade
brew cleanup
brew install node
sudo chown -R $(whoami) $(brew --prefix)/*
brew link --overwrite node
brew postinstall node

- 121
- 2
- 3
To link the node, run following command:
brew link homebrew/versions/node<version no>
And to check whether it is properly installed or not, run:
node -v
If node will get properly linked, it will not through any error, and will print node version. You can read nice explanation about it from here.

- 2,423
- 2
- 21
- 31
For line did the job:
brew link --overwrite node
It forces the link and overwrite all conflicting files:

- 8,623
- 6
- 46
- 85