Error with Python 2.3 as a shared Library

Andrew MacIntyre andymac at bullseye.apana.org.au
Thu Aug 14 08:29:27 EDT 2003


On Thu, 14 Aug 2003, Francisco Miguel Montenegro Montes wrote:

> whatever/bin/python    error while loading shared libraries:
> libpython2.3.so.1.0: cannot open shared object file: No such file or
> directory
>
> but this library (libpython2.3.so.1.0 ) is in the whatever/lib directory.
>
> What's wrong? Is it something related to the path? How can I tell python
> where the library is? Or is it not the problem?

You do need to inform the runtime loader where to find the Python shared
object.

There are several possibilities that you may be able to use depending on
your account privileges:-
- system-wide loader configuration file (ld.so.conf - probably not for you
  as you say you don't have this level of control);
- an explicit path to the SO when linking the parent binary (ld -rpath),
  or using dlopen();
- LD_LIBRARY_PATH environment variable.

I'm not current on Linux, so can't give you chapter and verse.

--
Andrew I MacIntyre                     "These thoughts are mine alone..."
E-mail: andymac at bullseye.apana.org.au  (pref) | Snail: PO Box 370
        andymac at pcug.org.au             (alt) |        Belconnen  ACT  2616
Web:    http://www.andymac.org/               |        Australia





More information about the Python-list mailing list