Yap, it’s not as easy as it is supposed to be.
1. First of all make sure you have installed zlib-dev library, which in Debian/Ubuntu is called zlib1-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
4. 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 :o)
No comments:
Post a Comment