Running MySQLdb under solaris and python 2.1

hugh beyer at incent.com
Fri Dec 28 16:35:32 EST 2001


I'm trying to write a cgi script in python that accesses the mySQL
database. This is made more complicated by the way my ISP forces
everything run from a cgi to be under the user's home directory. I
have python installed, and I have mySQLdb installed. But when I try to
use it I get the following error:

>>> import MySQLdb
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/export/home/incent01/usr/local/lib/python2.1/MySQLdb/__init__.py",
line 27, in ?
    import _mysql
ImportError: ld.so.1: python: fatal: libmysqlclient.so.10: open
failed: No such file or directory
>>>

So it's finding the MySQLdb package; it's loading the _mysql.so
module; and then it's failing to link in the libmysqlclient. (right?)
I've found libmysqlclient but I can't get it into the right directory
so the system can link it in--usr/local/bin (where the python program
is), usr/local/lib and usr/local/lib/python2.1 all don't work.

Is there some magic place for it? Is there some environment variable I
can set so it can be found?



More information about the Python-list mailing list