Problem :
I made the big mistake of trying remove all sudo dependencies. I simply downloaded npm as a package from the preferred site and did a manual global install. But I had to always run with the sudo. That’s why I tried to uninstall and tried to run it with homebrew.
Now the problem is I cannot even get node or npm to run. I think I need to link with brew link but I am getting following error:
Could not symlink share/doc/node/gdbinit
Target /usr/local/share/doc/node/gdbinit
already exists. You may want to remove it:
rm '/usr/local/share/doc/node/gdbinit'
I have also tried to remove that: And now I am getting permission denied.
I have tried to run brew prune also I have uninstalled and then reinstalled using following steps:
$ brew uninstall npm
$ brew uninstall node
$ npm uninstall npm -g
$ sudo rm -rf /usr/local/lib/node_module
Also I am running Yosemite 10.10.5. My git version is 2.6.0 installed. And my homebrew is updated. But still the brew doctor gives me following warning:
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:
Now I am completely stuck and don’t know how to solve it. Does anybody have any clue?