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
  • 10,783
  • The installation probably didn't finish due to an error. Have a look at the output in the terminal and see if you can find some clues. – Sergey Nov 20 '18 at 20:16

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?

  • Thank you, I used recommendations from post which you pointed. I read logs of curl command and find next thing.

    Not found

    • http://download.opensuse.org/repositories/home:/Alexx2000/xUbuntu_18.3/Packages 404 Not Found [IP: 195.135.221.134 80]

    probably it's important for succesfully install nodejs

    – dmitryprogrammer Nov 20 '18 at 20:42