10

I'm trying to get nodejs working. However, it tells me that node is not in my bin even though I downloaded the binary and added the location to my path.

> echo $PATH ...:/home/jvdh/node-v8.11.2-linux-x64/bin

>sudo npm install -g bitcore
/usr/bin/env: ‘node’: No such file or directory

jvdh
  • 211
  • 1
  • 2
  • 5

3 Answers3

8

Usually this is a simple naming problem, when you install from a package manager your bin file may be called nodejs so you just need to symlink it using the command:

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

Dawoodjee
  • 681
  • 1
  • 7
  • 22
7

Install nodejs8

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs

Install nodejs10

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs

Then try again with node

s1mmel
  • 1,974
  • 13
  • 19
  • 1
    taken from here https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions – s1mmel Jun 08 '18 at 06:32
  • Here are the [installation instructions for **newer versions**](https://github.com/nodesource/distributions/blob/master/README.md#debinstall) of `nodejs`. – Serge Stroobandt Sep 19 '19 at 11:45
  • For me the problem was also that npm wasnt installed – Fito Oct 06 '20 at 11:47
1

For Ubuntu 20.04, you can install node.js and npm:

sudo apt install nodejs npm
Fito
  • 560
  • 1
  • 5
  • 14