You need to manually create a symlink /usr/bin/node
. Shortcut for bash compatible shells:
sudo ln -s `which nodejs` /usr/bin/node
Or if you use non-standard shells, just hardcode the path you find with which nodejs
:
sudo ln -s /usr/bin/nodejs /usr/bin/node
Later edit
I found this explanation in the link you posted
There is a naming conflict with the node package (Amateur Packet Radio Node Program), and the nodejs binary has been renamed from node to nodejs. You'll need to symlink /usr/bin/node to /usr/bin/nodejs or you could uninstall the Amateur Packet Radio Node Program to avoid that conflict.
Later later edit
It's been a while since I answered this. Although the solution I posted up here worked for me several times, users have reported a few more solutions within the comments:
From @user229115
sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10
From AskUbuntu (user leftium)
sudo apt-get --purge remove node
sudo apt-get --purge remove nodejs
sudo apt-get install nodejs
ls -l /usr/bin/node
? – Wiesbadenlrwxrwxrwx 1 root root 22 Jan 1 2013 /usr/bin/node -> /etc/alternatives/node
– Lootexport | grep PATH
output when not usingzsh
? (it should print/usr/bin
among other things) – Wiesbadendeclare -x NODE_PATH="/usr/lib/nodejs:/usr/lib/node_modules:/usr/share/javascript"
– Lootdeclare -x PATH=".....
, notNODE_PATH
, justPATH
– Wiesbadendeclare -x PATH="/home/jatin/.rvm/gems/ruby-1.9.2-p320/bin:/home/jatin/.rvm/gems/ruby-1.9.2-p320@global/bin:/home/jatin/.rvm/rubies/ruby-1.9.2-p320/bin:/home/jatin/.rvm/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
– Lootnode
executable file from anywhere. When you typewhereis node
, what's the output? – Wiesbadenwhereis node
givesnode: /usr/bin/node /usr/bin/X11/node /usr/share/man/man1/node.1.gz
andwhich node
gives/usr/bin/node
– LootNo such file or directory
when attempting to run it. You should ask about this athttp://unix.stackexchange.com/
, since it does not seem to benodejs
related. – Wiesbaden-bash: /usr/sbin/node: No such file or directory
. Althoughusr/sbin/
is also in PATH. Thanks for your help, though! – Loot