"/usr/bin/ld: cannot find -lmysqlclient" when building MySQL-Python

F

francescomoi

Hi. I'm trying to build MySQL-python-1.2.0 on my Linux FC2
(with MySQL 3.23.58).

But when building, I get this error message:
-------------------------------------------------------
[]# python setup.py build
running build
running build_py
running build_ext
building '_mysql' extension
creating build/temp.linux-i686-2.3
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -march=i386
-mcpu=i686 -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.3 -c
_mysql.c -o build/temp.linux-i686-2.3/_mysql.o -I'/usr/include/mysql'
gcc -pthread -shared build/temp.linux-i686-2.3/_mysql.o
-L'/usr/lib/mysql' -lmysqlclient -lz -lcrypt -lnsl -lm -lmysqlclient -o
build/lib.linux-i686-2.3/_mysql.so
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
------------------------------------------------------

I've got that library installed:
----------------------------------------------
[]# locate libmysqlclient
/usr/lib/mysql/libmysqlclient.so
/usr/lib/mysql/libmysqlclient_r.so
/usr/lib/mysql/libmysqlclient.a
/usr/lib/mysql/libmysqlclient.so.10
/usr/lib/mysql/libmysqlclient.so.10.0.0
/usr/lib/mysql/libmysqlclient_r.a
/usr/lib/mysql/libmysqlclient_r.so.10.0.0
/usr/lib/mysql/libmysqlclient_r.so.10
---------------------------------------------
[]# vi /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/X11R6/lib
/usr/lib/qt-3.3/lib
/usr/local/mysql/lib/mysql
/usr/lib/mysql
 

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

Forum statistics

Threads
473,968
Messages
2,570,149
Members
46,695
Latest member
StanleyDri

Latest Threads

Top