Monday, July 02, 2012

Compiling Python with Bz2

Building python from source on RHEL5, I've had some troubles. Python keeps not finding bz2, giving me the complaint:

Python build finished, but the necessary bits to build these modules were not found:
_tkinter           bsddb185           dl              
gdbm               imageop            sunaudiodev     
To find the necessary bits, look in in detect_modules() for the module's name.

Failed to build these modules:
_curses            _curses_panel   _bz2

I already BUILT bz2 and installed it with the right prefix. UG.

FINALLY I found the following hint. Turns out bz2 source compile / make doesn't make everything by default. It just makes the executables bzunzip2, etc., but not the all-important (to python compiling) libbz2_so.

There's a file there, though, you just have to invoke it!

$ cd ~/temp
$ wget
$ tar zxvf bzip2-1.0.5.tar.gz
$ cd bzip2-1.0.5
$ make -f Makefile-libbz2_so
$ make
then, it works. NOTE: for the rest of the instructions, I like the page:
Post a Comment