0

I have node 0.10.x installed via apt-get and also nvm/npm.

I used nvm to install node 0.12.7 and used this command

(n=$(which node);n=${n%/bin/node}; chmod -R 755 $n/bin/*; sudo cp -r     $n/{bin,lib,share} /usr/local)

to copy the node binaries to /usr/local/ so that other users can use the version I chose using nvm. However getting the following error trying to do an npm install:

bash: /usr/local/bin/npm: /root/.nvm/versions/v0.12.7/bin/node: bad interpreter: Permission denied

Any advice?

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
  • Looks like `/root/.nvm/versions/v0.12.7/bin/node` doesn't have +x permissions set? – schtever Aug 13 '15 at 15:21
  • would that be chmod +X /root/.nvm/versions/v0.12.7/bin/node ? – Michael Eaton Aug 13 '15 at 15:25
  • Verify current permissions first: `ls -l /root/.nvm/versions/v0.12.7/bin/node`. I expect you will see `-rw-r--r--`. Then use a lowercase +x, e.g. `chmod +x /root/.nvm/versions/v0.12.7/bin/node` – schtever Aug 13 '15 at 15:58

0 Answers0