I also got the same error as Marius Milliunas when I ran make on Centos 6.4 - This was after I ran the ./configure command in the nodejs directory that I extracted from the loaded tarjs. Just like Marius Milliunas did.
The root of the problem is that the installation of nodejs depends on the installed Python. In particular, the default Python installation for Centos 6.4 does NOT include the bz2 module, and, of course, corrective actions begin with the installation of the bz2 module. This is done by running
yum install bzip2-devel
I also ran for good measure
yum install bzip2
The built-in Python for Centos 6.4 is Python 2.6.6, but it is great for installing the latest version of nodejs, which at the time of this writing is node v0.10.26
Once you run yum install bzip2-devel , you can go back and run make in the nodejs directory, and this time it will be done. Run by running make install in accordance with the instructions given in the nodejs directory.
You can test the installation of nodejs by running node and receiving a prompt. I decided to test creatint on a nodejs based web server as described in http://code.tutsplus.com/tutorials/real-time-chat-with-nodejs-socketio-and-expressjs--net-31708
I knew that everything was cool with the world and that I correctly installed nodejs on Centos 6.4 when I followed this instruction
The server is running, so you should be able to open http://127.0.0.1:3700/ and see: It works!
and got the conclusion "It works", as expected :)
Important Note
If you are additionally installing Python 2.7.6 and Python 3.3.4 on a Centos 6.4 machine, follow the instructions at this link: https://www.digitalocean.com/community/articles/how-to-set-up-python-2- 7-6-and-3-3-3-on-centos-6-4
Installing Python 2.7.6 and Python 3.3 is optional. Note that the final step in installing Python 2.7.6 and Python 3.3.4 is
make altinstall
and NOT make install. I ran make install by mistake and destroyed my access to the Python system, which is Python 2.6.6, and my access to yum. In fact, I assume that I destroyed my access to every Centos 6.4 program that relies on access to the Python system to work properly. If I managed to install nodejs at this point in time, I would also destroy my access to nodejs. I had to destroy and recreate / usr / local / bin / python 2 as a soft link to / usr / local / bin / python 2.6 and do the same with / usr / bin / python 2 to return to normal. Not a lot of fun.