"/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. Advertisements

  2. Andy Dustman Guest

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

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,636
    Suchandra Thapa
    Jul 21, 2003
  2. Replies:
    2
    Views:
    6,510
  3. Midex
    Replies:
    24
    Views:
    1,249
  4. washakie
    Replies:
    4
    Views:
    1,155
    washakie
    Jan 15, 2008
  5. abolotnov
    Replies:
    3
    Views:
    992
    Gabriel Genellina
    May 29, 2009
  6. George Trojan

    a question on building MySQL-python

    George Trojan, Feb 19, 2010, in forum: Python
    Replies:
    0
    Views:
    368
    George Trojan
    Feb 19, 2010
  7. dave
    Replies:
    4
    Views:
    1,687
    Steve Holden
    Nov 18, 2010
  8. Brian Candler

    Problem building mysql-ruby under 1.8.0

    Brian Candler, Aug 4, 2003, in forum: Ruby
    Replies:
    5
    Views:
    312
    Ollivier Robert
    Aug 4, 2003
Loading...