http://theholmesoffice.com/installing-node-js-on-ubuntu-for-the-first-time/
Steps to install node.js on Ubuntu 12.04 using terminal
We’ll be using the Ubuntu “Advanced Packaging Tool” (APT) to manage the installation. All code samples below should be run in a terminal window.
1: Make sure APT is up to date
In order to get the latest versions of the packages we’re going to install we need to update the APT Index:
sudo apt-get update
2: Check for dependencies
Node needs a couple of things to run properly, so let’s start off checking if they’re already installed, and installing them if necessary.
2.1: Check for a C compiler:
cc --version
If you have one installed you’ll get an output something like this:
If you don’t see something similar, install one (yes, that is meant to be a ‘g’ below!):
sudo apt-get install g++
2.2: Check Python is installed:
python
If Python is installed this will drop you into a Python command line like this (press Ctrl+D to drop back to the terminal prompt):
If you don’t see something like that, install Python:
sudo apt-get install python-software-properties
3: Install Node.js
Now to install Node.js. Fortunately this is also available through APT making life pretty easy for us:
sudo apt-get install nodejs
No comments:
Post a Comment