Skip to content
Melvin Mathew edited this page Aug 11, 2017 · 1 revision

Follow these steps to install Node.js:

  1. Complete the following installation tutorial: https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-16-04

  2. You might encounter a -bash: /usr/sbin/node: No such file or directory error when you try running the command node in the terminal. Quoting the reason for this error from the Debian Technical Committee resolution draft, published in mailing list:

    1.. The nodejs package shall be changed to provide /usr/bin/nodejs, not /usr/bin/node. The package should declare a Breaks: relationship with any packages in Debian that reference /usr/bin/node.

    2.. The nodejs source package shall also provide a nodejs-legacy binary package at Priority: extra that contains /usr/bin/node as a symlink to /usr/bin/nodejs. No package in the archive may depend on or recommend the nodejs-legacy package, which is provided solely for upstream compatibility. This package declares shall also declare a Conflicts: relationship with the node package.

    There are 2 ways to solve this:

    1. Install legacy node (More info)
      sudo apt-get install nodejs-legacy
      
    2. Manually add a symbolic link (More info)
      sudo ln -s `which nodejs` /usr/bin/node
      
Clone this wiki locally