Bounding Unicorns

How To Build Python 2.4 With Zlib

For whatever reason Python 2.4 by default builds without zlib.

I found a fix at stack overflow but had to combine both recipes to make it work.

The working solution for Debian Wheezy to use system zlib:

./configure --with-zlib=/usr/include --prefix=...
sed -i "s/^#zlib/zlib/g" Modules/Setup
make install

On my system this ended up linking the python binary against libz, rather than having a module.

You will want to ensure zlib1g-dev in installed.