Step-wise installation of NodeJs in Ubuntu
Note: Tested on Ubuntu 14.10
Open Terminal in ubuntu using Ctrl+Alt+T.
Run the below commands :
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm
sudo apt-get install nodejs
sudo apt-get install npm
This should install your NodeJS in Ubuntu.The version installed will be v0.10.* which is old but stable version.
Use below command to verify the installation
The above commands will install Nodejs with 4 and above version.
In order for some npm packages to work (such as those that require building from source), you will need to install the build-essentials package too.
Use below command to verify the installation
nodejs -v
If the above installation does not work (as in EC2 & other cloud instances) or For newer LTS versions, try installing NodeJs using PPA.
Run below commands in the terminal.
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get install -y nodejs
The above commands will install Nodejs with 4 and above version.
In order for some npm packages to work (such as those that require building from source), you will need to install the build-essentials package too.
sudo apt-get install -y build-essential
No comments:
Post a Comment