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

Discussion in 'Python' started by francescomoi@europe.com, May 11, 2005.

  1. Guest

    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
    ----------------------------------------------

    What's happening? Thank you very much.
    , May 11, 2005
    #1
    1. Advertising

  2. Andy Dustman Guest

    Andy Dustman, May 12, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ravi
    Replies:
    6
    Views:
    1,396
    Suchandra Thapa
    Jul 21, 2003
  2. Replies:
    2
    Views:
    6,174
  3. washakie
    Replies:
    4
    Views:
    909
    washakie
    Jan 15, 2008
  4. abolotnov
    Replies:
    3
    Views:
    823
    Gabriel Genellina
    May 29, 2009
  5. George Trojan

    a question on building MySQL-python

    George Trojan, Feb 19, 2010, in forum: Python
    Replies:
    0
    Views:
    264
    George Trojan
    Feb 19, 2010
Loading...

Share This Page