Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
This appears to be a situation where some software has
linked explicitly to that version (15) of the mysql client
library.
This may not be a "perfect" solution, but most times that
a fairly stable API is representing in a shared library,
the individual versions don't change the API's signatures,
and software compiled to use it doesn't necessarily care
what version is being used. Because of this, it can
sometimes help to "masquerade" the current version of
the library as the "old" one that is being looked for.
This is done by providing a symbolic link to the new
library, named as the old library.
Find your libmysqlclient<whatever>.so file, that you *do*
have on your system, and create a symbolic link to that
file, and name the link "libmysqlclient_r.so.15".
Do a "man ln" to see details of the ln command. You'll
want to use the "-s" parameter to get a symbolic link.
Give it a try, and post back if it doesn't work, and
we may be able to track down something else.
Oh, I get this error when trying to import MySQLdb:
>>> import MySQLdb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/site-packages/MySQL_python-1.2.3c1-py2.6-linux-i686.egg/MySQLdb/__init__.py", line 19, in <module>
import _mysql
File "/usr/lib/python2.6/site-packages/MySQL_python-1.2.3c1-py2.6-linux-i686.egg/_mysql.py", line 7, in <module>
File "/usr/lib/python2.6/site-packages/MySQL_python-1.2.3c1-py2.6-linux-i686.egg/_mysql.py", line 6, in __bootstrap__
ImportError: libmysqlclient_r.so.15: cannot open shared object file: No such file or directory
I tried creating a symbolic link in /usr/lib/python2.6/site-packages/MySQLdb as follows:
yes, sorry it took me so long to get back to this...
bathory is correct - in case it wasn't clear enough, the links
that you create have to be in a path that is searched by the
library load. You can either create these links beside their
originals in the directory they live in (/usr/lib/mysql), or
you can create the links in your own directory, perhaps in
/path/to/your/program/source, and then add that directory to
your LD_LIBRARY_PATH environment variable:
I find the first option most straightforward, but the second
option can be helpful if you don't have root access to write
to the original directory, or if you just don't want to mess
with your "system setup".
Hopefully this clears things up - let us know if you run into
further difficulties...
Hi I have what looks like an identical problem, but the solution presented doesn't seem to make any difference.
My error is: ImportError: libmysqlclient_r.so.15: cannot open shared object file: No such
file or directory
I have added the symbolic links in /usr/lib as follows:
None of these say anything about libmysqlclient_r.so.15 I don't really get this command at all. Can anyone see anything I'm doing wrong or that I should try now?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.