On Ubuntu, how can I compile and install node.js? It failed due to a cxx compiler fault.
Asked by Alfred
Install all required dependencies with a single line of code (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
The last two dependencies aren’t usually required, but installing them is always a good idea, and you’ll probably need them later.
Only the cxx compiler should be installed.
sudo apt-get install build-essential
If openssl isn’t installed,
sudo apt-get install libssl-dev
Answered by Alfred
If you’re trying to install this on an AWS instance running Amazon Linux AMI (which appears to be a stripped-down version of CentOS), follow these steps:
Install base tools:
“Development Tools” yum groupinstall
Now install openssl-devel:
yum install openssl-devel
Node should now be able to compile without issue.
Answered by Jay Sidri
If you’re using Win7 like me, you’ll need to run:
ash.exe $ /bin/rebaseall
…did the trick.
Answered by Nicholas Blumhardt
If you see this problem on Mac OSX, you’ll need to download and install XCode.
Answered by mjamal
On Cent OS, I needed to execute yum install gcc-c++.
Answered by Kelstar
Post is based on https://stackoverflow.com/questions/3329355/how-to-compile-install-node-jscould-not-configure-a-cxx-compiler-ubuntu