I have two Ubuntu 12.10 machines: machine A is a VMWare VM and machine B is and old Acer laptop. On both machines, I installed node using apt-get. However machine A installs the main binary as /usr/bin/node
and machine B as /usr/bin/nodejs
. Here are some behaviors I observed:
- Both machine returns
/usr/bin/node
in response to thewhich node
command. However, there is no such file on machine B. - Issuing the command
node
works for machine A, not B. On B, I have to usenodejs
instead. - On B, there is a binary called /sbin/node, A does not have it.
These behaviors causes inconsistency problem when developing on both machines. For now, I worked around by renaming the binaries on B as such:
sudo mv /sbin/node /sbin/node-sbin
sudo ln -s /usr/bin/nodejs /usr/bin/node
Is there a way to really fix this, so that node will be installed as /usr/bin/node
instead of /usr/bin/nodejs
?
/usr/bin/node
in Ubuntu 13.10. @user229115's answer below works, though. – Jim Stewart Jan 26 '14 at 07:42sudo apt-get install nodejs nodejs-legacy
will give you thenode
binary as node.js But if you already installed thenode
(Amateur Packet Radio Node Program) you'll obviously need to remove it. – jonasfj Feb 20 '14 at 04:03nodejs-legacy
package will work. – Leftium May 30 '14 at 16:24nodejs-lecacy
package which may be only a symlink to thenodejs
executable actually... – Augustin Riedinger Jun 02 '14 at 09:01