Trouble loading dll via ctypes

Discussion in 'Python' started by subopt inTheVicinityOf geemail.com, Jan 29, 2008.

  1. I'm trying to load a dll via ctypes by doing this:

    cdll.LoadLibrary('/path/to/mylib.so')

    But i'm getting this:

    /path/to/mylib.so: cannot open shared object file: No such file or
    directory What am i doing wrong?

    The dll in question is in a directory mounted via NSF, but no part of
    the path/filename is a symlink. When i try code from the docs:

    cdll.LoadLibrary('libc.so.6')

    ,then all is fine.

    I've also tried to set my LD_LIBRARY_PATH before starting Python,
    checking it via os.environ, then doing the cdll.LoadLibrary(...), but
    that fails with the same complaint. What am i doing wrong?

    tia,
    Eric
     
    subopt inTheVicinityOf geemail.com, Jan 29, 2008
    #1
    1. Advertising

  2. subopt inTheVicinityOf geemail.com wrote:
    > I'm trying to load a dll via ctypes by doing this:
    >
    > cdll.LoadLibrary('/path/to/mylib.so')
    >
    > But i'm getting this:
    >
    > /path/to/mylib.so: cannot open shared object file: No such file or
    > directory What am i doing wrong?
    >
    > The dll in question is in a directory mounted via NSF, but no part of
    > the path/filename is a symlink. When i try code from the docs:
    >
    > cdll.LoadLibrary('libc.so.6')
    >
    > ,then all is fine.
    >
    > I've also tried to set my LD_LIBRARY_PATH before starting Python,
    > checking it via os.environ, then doing the cdll.LoadLibrary(...), but
    > that fails with the same complaint. What am i doing wrong?
    >


    I vaguely remember you need execute permissions for a dynamic library to load.
    Permissions on an NFS mounted directory are different, especial for user 'root'.

    Check if can execute some executable in that NFS path.

    Helmut.



    --
    Helmut Jarausch

    Lehrstuhl fuer Numerische Mathematik
    RWTH - Aachen University
    D 52056 Aachen, Germany
     
    Helmut Jarausch, Jan 30, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Henk Punt
    Replies:
    0
    Views:
    398
    Henk Punt
    Jul 23, 2004
  2. Adam Twardoch
    Replies:
    1
    Views:
    365
    Peter Hansen
    Jul 6, 2005
  3. Replies:
    0
    Views:
    504
  4. Tim Grove

    ctypes - loading 'librsvg-2-2.dll'

    Tim Grove, Aug 26, 2008, in forum: Python
    Replies:
    0
    Views:
    429
    Tim Grove
    Aug 26, 2008
  5. Grigory Petrov
    Replies:
    4
    Views:
    1,229
Loading...

Share This Page