How to compile/install node.js(could not configure a cxx compiler!) (Ubuntu).

Alfred picture Alfred · Jul 25, 2010 · Viewed 26k times · Source

How can I compile/install node.js on Ubuntu? It failed with an error about cxx compiler.

Answer

Alfred picture Alfred · Jul 25, 2010

One-liner to install all needed dependencies(curl and git are not really needed, but are very useful and also needed if you install via nvm).

sudo apt-get install build-essential libssl-dev curl git-core

Last two dependencies are not always needed, but installing them is really usefull anyway and you probably need it later anyway.

To only install cxx compiler

sudo apt-get install build-essential

If openssl is missing

sudo apt-get install libssl-dev