[mod_python] _hashlib fails to load

Graham Dumpleton graham.dumpleton at gmail.com
Fri Apr 3 04:07:47 EDT 2009


Do an ldd on Apache. It possibly uses conflicting versions of the
libraries. You may need to do ldd on other Apache modules loaded.
Somewhere there is a conflict.

2009/4/3  <Roselinda.Ackermans at ec.europa.eu>:
> Hi Graham,
>
> Here some results :
> root # ldd _hashlib.so
>        libssl.so.0.9.8 =>       /opt/csw/lib/sparcv8plus+vis/libssl.so.0.9.8
>        libcrypto.so.0.9.8 =>    /opt/csw/lib/sparcv8plus+vis/libcrypto.so.0.9.8
>        libpython2.5.so.1.0 =>   /opt/csw/lib/sparcv8/libpython2.5.so.1.0
>        libsocket.so.1 =>        /usr/lib/libsocket.so.1
>        libnsl.so.1 =>   /usr/lib/libnsl.so.1
>        libdl.so.1 =>    /usr/lib/libdl.so.1
>        libresolv.so.2 =>        /usr/lib/libresolv.so.2
>        librt.so.1 =>    /usr/lib/librt.so.1
>        libpthread.so.1 =>       /usr/lib/libpthread.so.1
>        libm.so.1 =>     /usr/lib/libm.so.1
>        libc.so.1 =>     /usr/lib/libc.so.1
>        libmp.so.2 =>    /usr/lib/libmp.so.2
>        libaio.so.1 =>   /usr/lib/libaio.so.1
>        libmd5.so.1 =>   /usr/lib/libmd5.so.1
>        libthread.so.1 =>        /usr/lib/libthread.so.1
>        /usr/platform/SUNW,Sun-Fire-V890/lib/libc_psr.so.1
>        /usr/platform/SUNW,Sun-Fire-V890/lib/libmd5_psr.so.1
>
> I also used ldd -s to trace more in detail, and I concluded this :
> The LD_LIBRARY_PATH does not intervene. All libs are resolved by using the RPATH of _hashlib.so
> (which includes a path to all python libs ) and the system default search path /usr/lib.
> I made tests with setting LD_LIBRARY_PATH to <empty> or even to /tmp, but still, import hashlib works fine in the python console.
>
> Another test I made was calling python via cgi, and do a import hashlib there too :
>
>    #!/opt/csw/bin/python
>
>    import hashlib
>
> Again, no problems.
>
> In my ptest.py, I write nothing else but :
> import hashlib
>
> And then this fails.
>
> Linde
>
>
> # Likely problem is that _hashlib.so cannot find the shared libraries it
> # is dependent upon.
> #
>



More information about the Mod_python mailing list