Page 1 of 1

Problem when trying to include node.js in OpenELEC

Posted: Sat Oct 27, 2012 3:48 pm
by waynesi
I use node.js for a light-weight but essential service on a PC which I believe is overkill for the task, so I want to port it to my RPi. I tested the concept on the official wheezy and the system worked quite well with quite low CPU usage. However I mainly run OpenELEC on my Pi as media centre, so I desperately want to put node.js onto OpenELEC.

Because OpenELEC itself is very unfriendly to developers, the node.js has to be included as part of the system cross-compiling. So I cloned the OpenELEC master on my Debian and copied over the scripts\image and packages\lang\node (need bit tweak in meta to match the latest package name) from another github repos https://github.com/christoph00/OpenELEC.tv. I still don't know if the trick will work or not as christoph's repos is for Intel platform. I don't know if I need to do more to make sure node.js will be compiled for RPi or the OpenELEC build procedure will guarantee that. Anyway I got a fatal issue before I could go far enough to verify.

The whole tool chain and XBMC were build smoothly. But the procedure failed when building node.js and the error is that Python can't import bz2 module. The OpenELEC tool chain builds its own Python 2.7 in the target folder and use it to build node.js rather than the one (2.6) already on Debian. And that Python 2.7 doesn't have bz2 module. I tried every means I can find on internet to make/install libbz2 for the Python but nothing worked. All posts I checked are talking how to make/install the lib for the Python of the system which is not the right one I want to fix.

I'm an absolute beginner to Linux so the question may be simple, but I tried my best on research and now I really really need your kind help. Thanks a lot.

BTW, I tried the solutions from the three StackOverflow posts, but as I said it's for the Python on the system but not the one I need to fix. Please don't simply refer me to them. Thanks a lot.
http://stackoverflow.com/questions/8127 ... by-default
http://stackoverflow.com/questions/8115 ... thon-2-7-2
http://stackoverflow.com/questions/5873 ... -bz2-error