0

I'm working with ubuntu 14.04 LTS version. I have nodejs 0.10.x version installed on my PC, now i bought nodejs v6.9.4, respect to this latest version i updated the $PATH variable, now

$node -v Giving v6.9.4, where as internally npm and node not identifying these latest version, it is saying when i try to update any of the packages

wanted: {"node":">=4.0.0"} (current: {"node":"0.12.7","npm":"2.11.3"})

How to update these versions globally?

Thanks & Regards,

Jaccs
  • 1,052
  • 3
  • 12
  • 33
  • a simple google search query can solve this – Dmitry Matveev Jan 19 '17 at 02:34
  • I tried the solutions whatever i got from the google since 2 days. – Jaccs Jan 19 '17 at 02:36
  • Possible duplicate of [Install latest nodejs version in ubuntu 14.04](http://stackoverflow.com/questions/34974535/install-latest-nodejs-version-in-ubuntu-14-04) – Dmitry Matveev Jan 19 '17 at 02:38
  • Don't think that people who are posting questions are fools, luckily most of them are trying and at last they came to post here.. I found that possible duplicate in my research, But my concern is different. – Jaccs Jan 19 '17 at 02:40

2 Answers2

0

nvm install v6.9.1

Solved my problem.

Thanks,

Jaccs
  • 1,052
  • 3
  • 12
  • 33
-2

if you are struggling with nvm like I was. You want to start by removing your package installer. It's probably the one causing problems.

On your terminal sudo apt autoremove https://phoenixnap.com/kb/fix-sub-process-usr-bin-dpkg-returned-error-code-1

Step 2: https://joshtronic.com/2022/04/24/how-to-install-nodejs-18-on-ubuntu-2004-lts/

sudo apt update sudo apt upgrade

Step 3: sudo apt install -y curl

Step 4: curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - Step 5: sudo apt install -y nodejs

Step 6: node --version

Should be good to go