Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upgrade node.js from 0.12 version to 4.0 version on Windows and Ubuntu

I already have installed Node.js v0.12.2 on Windows and Node.js v0.12.4 on Ubuntu 14.04 LTS. Can I just run the latest installer to upgrade it to v4.0.0 on Windows and run sudo apt-get update on Ubuntu?

like image 203
Roman Avatar asked Sep 12 '15 19:09

Roman


1 Answers

Windows has an installer available at https://nodejs.org/en/download/

For Ubuntu, the official instructions are

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

Find where node is

which node

Replace it with

sudo ln -sf /usr/bin/nodejs /path/you/find/node
like image 140
Yuri Zarubin Avatar answered Nov 15 '22 18:11

Yuri Zarubin