Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to install Node.js on my CentOS server.
I run ./configure and it runs perfectly fine. I then run the 'make' command and it produces the following:

[5/38] libv8.a: deps/v8/SConstruct -> out/Release/libv8.a
/usr/local/bin/python "/root/node/tools/scons/scons.py" -j 1 -C
"/root/node/out/Release/" -Y "/root/node/deps/v8" visibility=default
mode=release arch=ia32 toolchain=gcc library=static snapshot=on scons:
Reading SConscript files ... ImportError: No module named bz2: File
"/root/node/deps/v8/SConstruct", line 37:
import js2c, utils File "/root/node/deps/v8/tools/js2c.py", line
36:
import bz2 Waf: Leaving directory `/root/node/out' Build failed:
-> task failed (err #2):
{task: libv8.a SConstruct -> libv8.a} make: * [program]
Error 1

I've done some searching on Google but I can't seem to find anything to help.
Most of what I've found is for Cygwin anyway, and I'm on CentOS 4.9.

Like I said, the ./configure went through perfectly fine with no errors, so there's nothing there that I can see.

EDIT

I've got a little further. Now I just need to upgrade G++ to version 4 (or higher).
I tried yum update gcc but no luck, so I tried yum install gcc44, which resulted in no luck either.
Has anyone got any ideas as to how I can update G++?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

The error you get is caused by a missing bz2 module for Python. I suppose you have manually compiled your Python, because I am pretty sure that Node.js will not compile with the system one.

share|improve this answer
    
To be honest, I've had a big problem with Python from the start. I accidentally uninstalled it, couldn't get it reinstalled, but finally did... I used the original RPM from the installation disc, and I thought that was the end of it. By the sounds of things it isn't. In the end I used this link: community.webfaction.com/questions/75/issue-nodejs-installation I'm now having problems with G++. I need to update from 3.x (whatever version I'm on) to at least 4.I tried to do a yum update, and then a yum install gcc44, but no matches. Any ideas on that one? I'm on CentOS 4.9 –  Richard Hedges Sep 8 '11 at 15:06
    
Your real problem is that CentOS 4.9 is obsolete by a wide margin, so mirrors no longer carry packages and updates - that's why you're struggling to update GCC. Chances are that it is so old that GCC 4.x was never packaged for it, and even if it was it'll have fallen off mirrors to be replaced by Centos 5.x + 6.x –  Steve Kemp Sep 18 '11 at 1:38

I dunno if you got it yet, figured I'd add this anyways. I was having the same bz2 problem, just had to install the bzip2 headers with yum install bzip2-devel then recompile python, then I was able to compile node without issue.

share|improve this answer
    
I haven't attempted to in a while. I got bored and moved on. I'll no doubt start playing with it again soon so thanks! I'm sure I'll run into the issue again. –  Richard Hedges May 18 '12 at 12:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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