MySQLdb-0.3.5 build problem (/usr/bin/ld: cannot find -lz)

Gerhard Häring gerhard.nospam at bigfoot.de
Sat Jun 16 20:21:34 EDT 2001


Darek Kedra wrote:
> 
> Hi,
> 
> I'm trying to install MySQLdb-0.3.5 with python 2.1 on Mandrake 8.0.
> After:
> # python setup.py build
> I am getting:
> 
> <--snip-->
> running build_ext
> building '_mysql' extension
> skipping _mysqlmodule.c (build/temp.linux-i686-2.1/_mysqlmodule.o
> up-to-date)
> gcc -shared build/temp.linux-i686-2.1/_mysqlmodule.o -L/usr/lib/mysql
> -lmysqlclient -lz -o build/lib.linux-i686-2.1/_mysql.so
> /usr/bin/ld: cannot find -lz
> collect2: ld returned 1 exit status
> error: command 'gcc' failed with exit status 1

It's complaining about a missing zlib. Which is very strange, as zlib is usually
present even on very basic Linux installs. If zlib is present in /lib, but not
in /usr/lib, I would try changing setup.py to include "/lib" in the variable
library_dirs (line 23 and 42).

Good luck!

Gerhard
--
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://highqualdev.com              public key at homepage
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))



More information about the Python-list mailing list