[python-sybase] relocation error when importing Sybase

Marcos Sánchez Provencio marcos at burke.ath.cx
Wed Nov 23 09:56:35 EST 2005


You are very right, but how many times has someone answered 
>> Check that your LD_LIBRARY_PATH is set right.
>> (i.e. $SYBASE/SYBASE.sh is sourced.)
?

PS I'll use the same postage stamp to say thanks to the author/s of this
module. :-)

El mar, 22-11-2005 a las 12:52 -0600, skip at pobox.com escribió:
>     >> > ImportError: ld.so.1: python: fatal: relocation error: file /home/
>     >> > disk1/server/lib/libtcl.so: symbol svr4_tli: referenced symbol not
>     >> > found
>     >> 
>     >> Check that your LD_LIBRARY_PATH is set right.
>     >> (i.e. $SYBASE/SYBASE.sh is sourced.)
> 
>     Marcos> It seems that we need more explicit error messages ;-)
> 
> That's only useful up to a point.  There are plenty of error messages in
> Python that could be more user-friendly.  This probably isn't one of them
> though.  The code in Python that raises the ImportError exception doesn't
> really know the details of why the import failed, only that it failed.
> dlopen() failures can happen for lots of reasons.  Here's the relevant bit
> from the dlopen() man page on Solaris 10 about return values.
> 
>      The dlopen() function returns NULL  if  pathname  cannot  be
>      found,  cannot  be  opened  for  reading, or is not a shared
>      object or a relocatable object. dlopen() also  returns  NULL
>      if an error occurs during the process of loading pathname or
>      relocating its symbolic references.  See  NOTES.  Additional
>      diagnostic information is available through dlerror().
> 
> Python (perhaps helpfully, perhaps not) regurgitates the message from
> dlerror().  It has no control over the content of that message, and it
> probably has no business trying to interpret it.
> 



More information about the Python-sybase mailing list