Search code examples
pythoninstallationbzip2

bz2 issue when installing Python 2.6.6 on Cent OS 5.8


I installed bzip2, bzip2-devel & bzip2-libs using the following command:

yum install bzip2 bzip2-devel bzip2-libs

Installation proceeded with to warning or error.

After this step, I installed Python 2.6.6 using the following commands (note: I must install it this way and not using yum):

wget http://www.python.org/ftp/python/2.6.6/Python-2.6.6.tgz
tar -xzvf Python-2.6.6.tgz
cd Python-2.6.6
./configure
make
make install

But on "make" step, I got the following error:

Failed to build these modules: bz2

I tried installing Mercurial 2.0.2 afterward but got the following error:

Couldn't import standard bz2 (incomplete Python install).

Anyone knows what I'm doing wrong here?

Thx


Solution

  • I managed to fix my problem by adding --enable-shared option when configuring Python.

    ./configure --enable-shared