0

help me please install NodeJs on my Ubuntu. I do

Using Ubuntu

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

and after installation, I do:

node -v

and get message like

"Programm node isn't installed yet, you can install it by doing `sudo apt install nodejs-legacy`"

I already installed and removed nodejs-legacy, but still, when I try to run nodejs -v, I get 4.2.6

And sorry for not perfect English, please help me.

abu_bua
  • 11,313

1 Answers1

1

The installation for Ubuntu and derivatives is very simple. Before installing be sure to uninstall the old nodeJS

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

Check if in some of the commands you do not get an error.

To remove the nodeJS please see the following post : How to remove nodejs from Ubuntu 16.04?