Help installing Node.js on Ubuntu 10.04 from a terminal?

I used this site to execute node installation commands:

https://github.com/joyent/node/wiki/Installation 

There were no errors in this part:

 git clone --depth 1 git://github.com/joyent/node.git # or git clone git://github.com/joyent/node.git if you want to checkout a stable tag cd node git checkout v0.4.10 # optional. Note that master is unstable. export JOBS=2 # optional, sets number of parallel commands. mkdir ~/local 

As soon as I hit this command, I got an error

 root@tgwizman :/node# ./configure --prefix=$HOME/local/node Checking for program g++ or c++ : not found Checking for program icpc : not found Checking for program c++ : not found /node/wscript:228: error: could not configure a cxx compiler! 

What should I do to get the cxx compiler?

+7
source share
4 answers

You just have to be able to run the following in a terminal:

 sudo apt-get update sudo apt-get install build-essential 

(Also, read https://help.ubuntu.com/community/CompilingSoftware for more background information, etc.)

+13
source

You are missing a compiler.

Just enter:

 sudo apt-get install g++ 

This guide has it all.

http://www.codediesel.com/linux/installing-node-js-on-ubuntu-10-04/

+8
source

On ubuntu I prefer to install nodejs via nvm , this worked best for me, and it will additionally allow you to switch the frequently used version of nodejs .

installation example:

 curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash command -v nvm nvm install node nvm use node nvm run node --version 
+1
source

Below is a complete guide on configuring nodejs on Ubuntu 10.04

http://blog.markmirandilla.com/2012/12/14/how-to-setup-node-js-in-ubuntu-10-04/

0
source