7

I was using this site to follow the commands on how to install node:

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

This part had no errors:

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

Once I hit this command, I got the 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 a cxx compiler?

4 Answers 4

13

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

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

(Also, have a read of https://help.ubuntu.com/community/CompilingSoftware for a bit more background info, etc.)

2
  • Does anyone know how to install this on Fedora 16? I've tried this with no luck... [agile@453D05J node-v0.10.15]$ sudo yum install g++ Loaded plugins: langpacks, presto, refresh-packagekit No package g++ available. Error: Nothing to do [agile@453D05J node-v0.10.15]$ Aug 2, 2013 at 18:06
  • Sorry... Typical: Found the answer, I found the answer, I need to install $ sudo yum install gcc-c++ Aug 2, 2013 at 18:15
8

You are missing the 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/

1

On ubuntu I prefer to install nodejs via nvm, this has worked for me best and additionally it will allow you to toggle multiple version of nodejs which is frequently needed.

example installation:

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
0

Here is a complete guide, step by step on how to setup nodejs on Ubuntu 10.04

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.