installation nodeJs in Ubuntu

4

In Ubuntu the Node.JS package was renamed to nodejs because there was already another node package.

How do I make npm understand that nodejs is already installed on the system, but the name of the different?

I've gotten the error:

  

sh: 1: node: not found

     

npm WARN This failure might be due to the use of legacy binary "node"

    
asked by anonymous 30.08.2017 / 16:27

1 answer

0

[TL; DR]

$ sudo ln -s /usr/bin/nodejs /usr/bin/node

Probably when you installed nodejs from the apt-get installer, the node was still a version prior to 0.10.x, to quickly resolve the above command, which just creates a symbolic link.

You can also (if you want / can take the risk) try to reinstall everything to try a more updated version:

$ sudo apt-get purge nodejs
$ sudo apt-get update
$ sudo apt-get install nodejs
$ sudo apt-get install npm
    
02.09.2017 / 22:41