It seems that Python 2.6.1 doesn't compile bz2 library by default from source.
I don't have lib-dynload/bz2.so
What's the quickest way to add it (without installing Python from scratch)?
OS is Linux 2.4.32-grsec+f6b+gr217+nfs+a32+fuse23+tg+++opt+c8+gr2b-v6.194 #1 SMP Tue Jun 6 15:52:09 PDT 2006 i686 GNU/Linux
IIRC I used only --prefix flag.
You need libbz2.so (the general purpose libbz2 library) properly installed first, for Python to be able to build its own interface to it. That would typically be from a package in your Linux distro likely to have "libbz2" and "dev" in the package name.
Use your vendor's package management to add the package that contains the development files for bz2. It's usually a package called "libbz2-dev". E.g. on Ubuntu
sudo apt-get install libbz2-dev
There are 2 solutions for this trouble:
On Debian and derivatives, you can install easily like this:
sudo apt-get install bzip2-devel
In the README file of bzip2 package, it is explained that under certain platforms, namely those which employ Linux-ELF binaries, you have to build an additional shared object file like shown below:
wget http://bzip.org/1.0.6/bzip2-1.0.6.tar.gz
tar xpzf bzip2-1.0.6.tar.gz
cd bzip2-1.0.6
make
make -f Makefile-libbz2_so
make install PREFIX=/path/to/local # /usr/local by default
The critical bit here is the following command:
make -f Makefile-libbz2_so
I've done this and after that tried to build Python again, like shown below:
cd Python-2.7.3
./configure --prefix=/path/to/local
make install
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With