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

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
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
  • 2,024
1

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

sudo apt install nodejs npm
Fito
  • 660