[OpenSIPS-Users] Mediaproxy 2.1.0 on Red Hat/CentOS
Dan Pascu
dan at ag-projects.com
Thu Nov 27 20:10:16 CET 2008
On Thursday 27 November 2008, John Quick wrote:
> Dan
>
> I really appreciate your help on this. I used your lsof procedure on
> the pid of Python after importing gnutls.library and it showed the
> following: # lsof -p 12803
> SIZE NODE NAME
> 4096 25296897 /root
> 4096 2 /
> 8304 6700861 /usr/bin/python
> 134400 2425120 /lib64/ld-2.5.so
> 1699880 2425121 /lib64/libc-2.5.so
> 23360 2425122 /lib64/libdl-2.5.so
> 141456 2425126 /lib64/libpthread-2.5.so
> 615136 2425128 /lib64/libm-2.5.so
> 1234008 6692943 /usr/lib64/libpython2.4.so.1.0
> 314520 6700843 /usr/lib64/libgcrypt.so.11.2.2
> 85608 6692065 /usr/lib64/libz.so.1.2.3
> 15584 2425108 /lib64/libtermcap.so.2.0.8
> 114352 2425129 /lib64/libnsl-2.5.so
> 18152 2425145 /lib64/libutil-2.5.so
> 540576 6702936 /usr/lib64/libgnutls.so.13.0.6
> 247224 6692881 /usr/lib64/libreadline.so.5.1
> 56414144 6690688 /usr/lib/locale/locale-archive
> 21808 6853309 /usr/lib64/python2.4/lib-dynload/readline.so
> 25464 6691193 /usr/lib64/gconv/gconv-modules.cache
> 19960 7113538
> /usr/lib64/python2.4/site-packages/gnutls/library/_gnutls_init.so
> 134495 6703491 /usr/lib64/libgnutls-extra.so.26.4.6
> 15208 6696908 /usr/lib64/libgpg-error.so.0.3.0
> 2669434 6702949 /usr/local/lib/libgnutls.so.26.4.6
> 320003 6857078 /usr/lib64/python2.4/site-packages/_ctypes.so
> 23736 6853317 /usr/lib64/python2.4/lib-dynload/structmodule.so
>
> So it is using so.13.0.6 from /usr/lib64 and so.26.4.6 from
> /usr/local/lib. I thought this looked a bit odd,
That's the cause of your problem, exactly what I mentioned before. For
some reason _gnutls_init.so was compiled against one (probably the one
in /usr/local), while the lib loaded at runtime was from /usr/lib64
> so I tried to manually
> update various libgnutls files in my /usr/lib64 directory......and now
> I've broken it!
You didn't actually broke it. You probably removed one of the libs, the
one that _gnutls_init.so was linked against, and now the module cannot be
loaded. Rebuild/reinstall python-gnutls. Make sure it links with the same
lib that will be loaded at rutime (you should only see one set, either
from /usr/local or /usr/lib64, but not both).
>
> Python gives an error when I run the "import functions" command in PHP:
> >>> from gnutls.library import functions
>
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File "gnutls/library/__init__.py", line 4, in ?
> from gnutls.library import _gnutls_init
> ImportError: cannot import name _gnutls_init
Yeah. As I said, the lib _gnutls_init.so was linked against is gone.
> Unfortunately, my knowledge of Linux libraries/packages and how they
> are stored, updated and loaded is poor - I only ever used Yum before
> this. I may have to give up. It's too hard. But I hate to throw away
> the time already spent trying. :-(
I do not have experience with 64bit systems, so I don't know what to
advice you, but your problem seems to come from using a mix of 32/64 bit
versions of the same library at the same time.
One idea that comes to mind, is to remove everything gnutls related
from /usr/local (libgnutls, libcgrypt, libtasn1 and their header files)
and then rebuild/reinstall python-gnutls. Hopefully will use the 64 bit
versions of the libs from /usr/lib64 this time, as python and the other
modules.
--
Dan
More information about the Users
mailing list