I recently had the “pleasure” to build node.js on a relatively vanilla CentOS machine. I was a little surprised at the number of dependencies which were missing.
So, I wanted to take a little time to document the experience. I don’t know whether this is successful for anyone else. It will depend on your initial CentOS set-up, and what yum repositories you have access to.
My first surprise during installation was that I did not have the expected C++ packages installed, even though gcc was installed and available on my path. I had to grab the following package:
sudo yum install gcc-c++
Then, node.js began complaining about openssl not being available, even though it was. What node.js meant is that it wanted the SSL libs that are packaged in openssl-devel. So…
sudo yum install openssl-devel
After that, everything went as advertised. Here’s all the install steps together:
sudo yum install gcc-c++ sudo yum install openssl-devel sudo yum install python sudo yum install git git clone git://github.com/joyent/node.git cd node git checkout v0.4 sudo ./configure sudo make sudo make install curl http://npmjs.org/install.sh | sh