Installing Python 2.4 with zlib on Debian
Yap, it’s not as easy as it is supposed to be.
-
First of all make sure you have installed
zlib-dev
library, which in Debian/Ubuntu is calledzlib1-dev
:$ sudo aptitude install zlib1-dev
-
Download Python from http://www.python.org/download/releases/2.4.6/
$ cd /tmp $ wget http://www.python.org/ftp/python/2.4.6/Python-2.4.6.tgz
-
Decompress it:
$ tar -zxvf Python-2.4.6.tgz
-
Compile it. STOP, I did that 10 times already with and without
–with-zlib=/usr/include
option, nothing, only a lot of frustration. So here is the key:$ cd /lib $ sudo ln -s x86_64-linux-gnu/libz.so.1 libz.so
-
Now compile and install python:
$ cd /tmp/Python-2.4.6 $ ./configure --prefix=/opt/python24 $ make $ make install
-
Test if zlib is installed:
$ /opt/python24/bin/python -c "import zlib"
-
Enjoy!
Subscribe to Alin Voinea
Get the latest posts delivered right to your inbox