Menu

Cannot find libmysqlclient_r.so.16

Help
2009-11-05
2012-09-19
  • Shu Hung (Koala)

    Hello,

    I installed a MySQL 5.1 to a custom location.

    Then I installed mysqldb.

    The installation is fine. But when I tried to use it with my web app, it keep
    complained me of this:

    ImproperlyConfigured: Error loading MySQLdb module: libmysqlclient_r.so.16:
    cannot open shared obj

    ect file: No such file or directory

    What is my problem? Any suggestion?

     
  • Andy Dustman

    Andy Dustman - 2009-11-05

    libmysqlclient_r.so is not on your default library load path. You don't say
    what OS you are using (but obviously something POSIX), so you'll have to do
    your own research on how to correct this.

    You can also build MySQLdb with a statically-linked library. The describes how
    to do this.

    : http://mysql-python.svn.sourceforge.net/viewvc/mysql-
    python/branches/MySQLdb-1.2/MySQLdb/README?view=markup

     
  • Florian Demmer

    Florian Demmer - 2010-01-14

    Instead of changing your LD_LIBRARY_PATH you should set "runtime_library_dirs"
    to point to your library path on the destination system in the setup_posix.py
    before compiling.

    eg. like this:

         86     ext_options = dict(
         87         name = "_mysql",
         88         library_dirs = library_dirs,
         89         runtime_library_dirs = library_dirs, 
         90         libraries = libraries,
         91         extra_compile_args = extra_compile_args,
         92         include_dirs = include_dirs,
         93         extra_objects = extra_objects,
         94         define_macros = define_macros,
         95         )
         96     return metadata, ext_options
    
     

Log in to post a comment.