REPOST: Re: Running MySQLdb under solaris and python 2.1

Martin von Loewis loewis at informatik.hu-berlin.de
Fri Dec 28 18:26:47 EST 2001


beyer at incent.com (hugh) writes:

> 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? 

The system only looks in /lib and /usr/lib, see ld.so(1). You can
hard-code additional directories to search for libraries inside
_mysql.so, by passing a -R option to the linker, e.g.

cc -G -o _mysql.so <object files> -R/myhome/lib -L/myhome/lib -lmysqlclient

See ld(1) for a description of the -R option.

> Is there some environment variable I can set so it can be found?

Yes, LD_LIBRARY_PATH, see ld.so(1).

HTH,
Martin

========= WAS CANCELLED BY =======:
Path: news.sol.net!spool0-nwblwi.newsops.execpc.com!newsfeeds.sol.net!newspump.sol.net!nntp1.roc.gblx.net!nntp.gblx.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!enews.sgi.com!news-xfer.nuri.net!feeder.kornet.net!news1.kornet.net!ua4canc3ll3r
From: Martin von Loewis <loewis at informatik.hu-berlin.de>
Newsgroups: comp.lang.python
Subject: cmsg cancel <j4r8pfapu0.fsf at informatik.hu-berlin.de>
Control: cancel <j4r8pfapu0.fsf at informatik.hu-berlin.de>
Date: Mon, 31 Dec 2001 03:29:15 GMT
Organization: A poorly-installed InterNetNews site
Lines: 2
Message-ID: <cancel.j4r8pfapu0.fsf at informatik.hu-berlin.de>
NNTP-Posting-Host: 211.57.49.2
X-Trace: news2.kornet.net 1009774986 27193 211.57.49.2 (31 Dec 2001 05:03:06 GMT)
X-Complaints-To: usenet at news2.kornet.net
NNTP-Posting-Date: Mon, 31 Dec 2001 05:03:06 +0000 (UTC)
X-No-Archive: yes
X-Unac4ncel: yes
X-Commentary: I love NewsAgent 1.10 and the Sandblaster Cancel Engine Build 74 (19 March 1999)

This message was cancelled from within Mozilla.



More information about the Python-list mailing list