I can\'t seem to install zlib properly, I installed Python from source on Ubuntu10.4
\'######## edit #####################
bobince and Luper helped.
Make s
Keep in mind that Ubuntu is using a directory called /lib/x86_64-linux-gnu for x64 architectures. If you are using that architecture you need to create a symbolic link:
$ sudo ln -s /lib/x86_64-linux-gnu/libz.so.1 /lib/libz.so
Also, you should do same thing for others shared libraries.
Try to install dpkg-dev before configuring and compiling Python. This will install the dpkg-architecture executable on the system, which Python uses (see setup.py) to determine where the libz.so library is. For more details see http://fnch.users.sourceforge.net/pythononubuntu1004.html
You don't want zlibc
, it's something else completely. You want zlib1g
(which will certainly be installed already) and, as Luper mentioned, the ‘development’ package which is zlib1g-dev
.
Debian-based Linux distros split each C library into a separate runtime binary package and a development package which delivers the headers for inclusion at compile time. If you want to compile something from source that relies on the library you need both packages. It's a bit of an annoyance, but probably inevitable given the staggeringly enormous number of libs the likes of Ubuntu deliver.
Make sure you bring in other -dev
packages you might want Python to be able to use, too, such as libexpat1-dev
, libdb4.8-dev
, libncurses5-dev
and libreadline6-dev
(using the Python interpreter without readline is painful!). You'll then have to recompile Python to take advantage of them.
(Or if you can't be bothered, you might forget setuptools, and just unpack whatever end app it is yourself and drop it in the site-packages or wherever. Have to say I'm not a huge fan of eggs.)
Make sure the dev package of zlib (and any other lib that a standard module you need depends on) is installed when configuring and compiling Python from source.