Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update node to v12 on ubuntu

Tags:

loopbackjs

I want to update my node to version greater than v10 but i still get v9.11.2. I tried this commands

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

and i am still on v9.11.2 i also remove and reinstall but no change. With n :n latest the answer it's also v9.11.2 with sudo apt-get install --only-upgrade nodejs the response is: your version is up to date

I really need v10 and greater for my loopback project

like image 492
gildas kevin Avatar asked Mar 14 '20 05:03

gildas kevin


1 Answers

First remove nodejs using,

sudo apt-get purge --auto-remove nodejs

Then after, if curl is not installed then run the below command

sudo apt-get install curl

Then after run the below 2 commands,

curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -

sudo apt-get install -y nodejs

like image 174
Avinash Antala Avatar answered Jan 01 '23 22:01

Avinash Antala