Basically, the build and install works, but when I run a Python script:
import sys, MySQLdb
I get the error:
... in PIL/init.py in <module>
... in /egg/mysql.py in <module>
... in /egg/_mysql.py in _bootstrap
ImportError: ld.so.1: python2.5: fatal: libmysqlclient_r.so.15: open failed: No such file or directory.
I'm using Python 2.5.2, MySQL 5.0.67 and MySQL-python-1.2.2.
Would anybody please be able to help me with this issue?
Thanks,
Matt
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
WOW, AWESOME, thanks Michael!
This worked perfectly!
=) =) =)
Here is the exact solution that worked for me (for the benefit of future users):
su to root [su].
Backed up the existing ld.config file [cp /var/ld/ld.config /var/ld/ld.config-backup].
Edited the file [emacs /var/ld/ld.config]. Looked through it for the directory sections and added the path I wanted [/opt/local/lib/mysql] to the list, separated by colons. I ignored the rest of the gunk in the file.
Saved the file, closed, ran python. It worked!
Step 3 could probably have been replaced with using the 'crle' tool that Michael describes above.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
libmysqlclient_r.so is one of MySQL shared libraries. Apparently it's not on your loader's path. Copy it around or set the loader path. There should be a distutils/setuptools option for this. Or... are you sure everything was built with no errors?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I ran into the same problem and eventually found the root of the problem:
the link library path is handled in Solaris not with $LD_LIBRARY_PATH but with 'crle' - their runtime linking environment configuration. With this tool you can generate a /var/ld/ld.config and add the according directory (for me this was /opt/mysql/mysql/lib/). After that the ld.so.1 error was gone and I can import MySQLdb. :)
Cheers,
Michael
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm using OpenSolaris (a Joyent accelerator)
Basically, the build and install works, but when I run a Python script:
import sys, MySQLdb
I get the error:
... in PIL/init.py in <module>
... in /egg/mysql.py in <module>
... in /egg/_mysql.py in _bootstrap
ImportError: ld.so.1: python2.5: fatal: libmysqlclient_r.so.15: open failed: No such file or directory.
I'm using Python 2.5.2, MySQL 5.0.67 and MySQL-python-1.2.2.
Would anybody please be able to help me with this issue?
Thanks,
Matt
WOW, AWESOME, thanks Michael!
This worked perfectly!
=) =) =)
Here is the exact solution that worked for me (for the benefit of future users):
su to root [su].
Backed up the existing ld.config file [cp /var/ld/ld.config /var/ld/ld.config-backup].
Edited the file [emacs /var/ld/ld.config]. Looked through it for the directory sections and added the path I wanted [/opt/local/lib/mysql] to the list, separated by colons. I ignored the rest of the gunk in the file.
Saved the file, closed, ran python. It worked!
Step 3 could probably have been replaced with using the 'crle' tool that Michael describes above.
bump... can anybody even point me in the right direction here? Anything at all would be appreciated =)
libmysqlclient_r.so is one of MySQL shared libraries. Apparently it's not on your loader's path. Copy it around or set the loader path. There should be a distutils/setuptools option for this. Or... are you sure everything was built with no errors?
Thanks -
I don't know how to manipulate my loader's path or to use distutils/setuptools.
I tried doing export CLASSPATH= etc and also I tried adding it to my python path using sys.path.append. However, neither seemed to work.
(the file resides in /opt/local/lib/mysql/)
Could you give me a quick description of how I'd add these thingos to my loader's path? Or if copying it is an option, where to copy them to?
Thanks -
I don't know how to manipulate my loader's path or to use distutils/setuptools.
I tried doing export CLASSPATH= etc and also I tried adding it to my python path using sys.path.append. However, neither seemed to work.
(the file resides in /opt/local/lib/mysql/)
Could you give me a quick description of how I'd add these thingos to my loader's path? Or if copying it is an option, where to copy them to?
I ran into the same problem and eventually found the root of the problem:
the link library path is handled in Solaris not with $LD_LIBRARY_PATH but with 'crle' - their runtime linking environment configuration. With this tool you can generate a /var/ld/ld.config and add the according directory (for me this was /opt/mysql/mysql/lib/). After that the ld.so.1 error was gone and I can import MySQLdb. :)
Cheers,
Michael