Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
16
rated 0 times [  16] [ 0]  / answers: 1 / hits: 48554  / 1 Year ago, mon, february 20, 2023, 2:14:59

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:




  1. Both machine returns /usr/bin/node in response to the which node command. However, there is no such file on machine B.

  2. Issuing the command node works for machine A, not B. On B, I have to use nodejs instead.

  3. 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?


More From » apt

 Answers
1

On Ubuntu 13.10 all answers above did not work for me.
It finally worked when I installed nodejs-legacy



sudo apt-get install nodejs-legacy


This correctly provided /usr/bin/node for me, so that e. g. nodemon can be used.


[#33391] Monday, February 20, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
confiorc

Total Points: 42
Total Questions: 121
Total Answers: 123

Location: India
Member since Wed, Aug 26, 2020
4 Years ago
confiorc questions
Fri, Jul 23, 21, 18:21, 3 Years ago
Tue, Mar 22, 22, 14:25, 2 Years ago
Thu, Feb 17, 22, 22:43, 2 Years ago
;