Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I already have Python2.7 but due to certain reasons I need to install Python2.4. So, I installed python2.4 and when I run with Python2.4/python, I got the error that says

can't decompress data; zlib not available.

I installed zlib1g and zlib1g-dev as well. I restarted my console but I am still getting this error. Can anyone help me with this? I got from this link.

When I do

which zlib

in the console it says

zlib not found

share|improve this question
A little more context on the error might be helpful... Was there more to it? – mac9416 Aug 9 '12 at 16:35
up vote 2 down vote accepted

I don't find a Python 2.4 package for Ubuntu, so I assume you tried to compile it from source. If so, you would have had to explicitly configure and compile it with zlib support.

I found a blog article on how to do this here:

basically install zlib1g-dev, and then configure Python with

./configure --with-zlib=/usr/include

then you can do "make" to generate the Python 2.4 binaries.

share|improve this answer
configure: WARNING: unrecognized options: --with-zlib (Python 2.7.3) ?? – szx Sep 7 '12 at 12:13
run ./configure --help to see the available options for the software you're trying to build. BTW, if it's Python 2.7, that's widely available as a package for Ubuntu so you shouldn't need to build from source. – roadmr Sep 7 '12 at 14:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.