Libmysqlclient.So.15: Cannot Open Shared Object File: No Such File or Directory

libmysqlclient.so.15: cannot open shared object file: No such file or directory

Okay this saves the day.

wget -O /usr/lib64/libmysqlclient.so.15 http://files.directadmin.com/services/es_5.0_64/libmysqlclient.so.15
chmod 755 /usr/lib64/libmysqlclient.so.15
ldconfig

mysql2.so: libmysqlclient_r.so.15: cannot open shared object file: No such file or directory

If you encounter this error again after upgrading to 12.04 (or for people arriving here after googling the title of this page after upgrading to 12.04), the following worked for me:

gem uninstall mysql2
gem install mysql2

This will recompile the gem using libmysqlclient18, and worked for me.

Hope that helps someone out there.

How can I tell python which version of libmysqlclient.so to use?

You can't tell the dynamic linker which version of a library to use, because the SONAME (full name of the library + interface) is part of the binary.

In your case, you can try to upload libmysqlclient_r.so.14 to the host and set LD_LIBRARY_PATH accordingly, so tell the dynamic linker which directories to search additionally to the system dirs when resolving shared objects.

You can use ldd to see if it LD_LIBRARY_PATH works:

$ ldd $path_to/_mysql.so
...
libmysqlclient_r.so.14 => $path_to_lib/libmysqlclient_r.so.14
...

Otherwise, there will be an error message about unresolved shared objects.

Of course that can only be a temporary fix until you rebuild MySQLdb to use the new libraries.

Error loading MySQLdb module: libmysqlclient.so.20: cannot open shared object file: No such file or directory

reinstall the c shared library:

pip uninstall mysql-python
pip install mysql-python


Related Topics



Leave a reply



Submit