/usr/bin/ld: cannot find -lz on Cent OS - Python 2.4

V

V8 NUT

Been trying to fix this issue for over 6 hours now.
It's doin my head in, any one know whats going on here.

==START==
python setup.py build
running build
running build_py
copying MySQLdb/release.py -> build/lib.linux-x86_64-2.4/MySQLdb
running build_ext
building '_mysql' extension
gcc -pthread -shared build/temp.linux-x86_64-2.4/_mysql.o -L/usr/lib64/
mysql -L/usr/lib64 -lmysqlclient_r -lz -lpthread -lcrypt -lnsl -lm -
lpthread -lssl -lcrypto -o build/lib.linux-x86_64-2.4/_mysql.so
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for
-lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -
lz
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

==END==

Am trying to get MySQL-python-1.2.3c1 installed on a CentOS 5 box
running Python 2.4
I do not want to upgrade my Python version.
I have tried:

1. yum install mysql-python
2. yum install librsync-devel
3. yum install python-devel

With all return no errors and a notification that there's nothing to
install or update.

Please help.
 
J

Jonathan Gardner

/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for
-lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -
lz
/usr/bin/ld: cannot find -lz

This is your problem.
Am trying to get MySQL-python-1.2.3c1 installed on a CentOS 5 box
running Python 2.4
I do not want to upgrade my Python version.
I have tried:

1. yum install mysql-python
2. yum install librsync-devel
3. yum install python-devel

With all return no errors and a notification that there's nothing to
install or update.

I think you need libz's -devel module. Not sure what libz is or what
its name is in the yum repository. Might take a search or maybe an rpm
-qif /usr/lib/libz.so

The problem could be that mysql-python expects to see a different
version of libz than what's installed on your box. If so, you'll need
to see if you can find the right version.

The MySQL-python people should have more help for you.
 
A

Anssi Saari

V8 NUT said:
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

Could it be you're missing zlib-devel? What does yum info zlib-devel
say? Or locate libz?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top