0

I try to install node on my RPi using this tutorial

But when I type "node -v" to test it doesn't provide any output:

pi@raspberrypi ~ $ node -v

whereas the complete path does:

pi@raspberrypi ~ $ /opt/node/bin/node --version
v0.10.2

although my path variable is well set (via .bash_profile):

pi@raspberrypi ~ $ path
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin
/usr/local/games
/usr/games
/opt/node/bin

I think it matters to precise I am doing all this stuff via SSH.

[EDIT]: When I am root, it works...

root@raspberrypi:/home/pi# node -v
v0.10.2

How to make it work even when I am 'only' the user 'pi' ?

Thanks for your help!

  • What about node --version? – Gerben Jan 18 '14 at 17:06
  • @Gerben node -v and node --version are equivalent. – goldilocks Jan 18 '14 at 19:25
  • when you ssh, what does whoami give? You should be logged in as pi, so you should have the same path that you have when you're logged in "normally". And what does which node give? – francis Jan 20 '14 at 8:15
  • thks francis, whoami -> pi, and which node -> /usr/local/bin/node ... Unexpectedly, the day after I posted this question, it worked without any changes... so I really don't know what did the trick, but it works now. The only thing I could have done was a reboot of the pi, but I doubt I forgot to try it at first time... So I cannot really explain... – edelans Jan 20 '14 at 23:31
0

Unexpectedly, the day after I posted this question, it worked without any changes... so I really don't know what did the trick, but it works now. The only thing I could have done was a reboot of the pi, but I doubt I forgot to try it at first time... So I cannot really explain, but you can try to reboot your pi.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.