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?
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")
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.
You can change the permission of the file "/usr/local/bin/node", like "chmod +w /usr/local/bin/node", to make it writable.