help on import libxml2

jianbing.chen at gmail.com jianbing.chen at gmail.com
Fri Aug 15 16:02:03 CEST 2008


Paul,

Thanks. This helped.

Jianbing

On Aug 14, 4:10 pm, Paul Boddie <p... at boddie.org.uk> wrote:
> On 14 Aug, 22:43, jianbing.c... at gmail.com wrote:
>
>
>
> > Traceback (most recent call last):
> >   File "<stdin>", line 1, in <module>
> >   File "/sea/local/lib/python2.5/site-packages/libxml2.py", line 1, in
> > <module>
> >     import libxml2mod
> > ImportError: ld.so.1: python: fatal: relocation error: file /usr/local/
> > lib/python2.5/site-packages/libxml2mod.so: symbol
> > xmlXIncludeProcessFlags: referenced symbol not found
>
> The symbol mentioned should be found in the libxml2.so library file
> (which I discovered by running nm on the static libxml2.a file). On my
> Ubuntu system, if I run the ldd program on the libxml2mod.so file (in
> a different place to where yours lives), I get the following results:
>
>   ldd /var/lib/python-support/python2.5/libxml2mod.so
>         linux-gate.so.1 =>  (0xffffe000)
>         libxml2.so.2 => /usr/lib/libxml2.so.2 (0xb7e0b000)
>         libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7cca000)
>         libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7cc5000)
>         libz.so.1 => /usr/lib/libz.so.1 (0xb7cb1000)
>         libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7c8a000)
>         /lib/ld-linux.so.2 (0x80000000)
>
> I suggest you run ldd on /usr/local/lib/python2.5/site-packages/
> libxml2mod.so for each user and see what it tells you. Perhaps there
> are permissions issues on the libxml2.so files, wherever they are
> installed, or there's a LD_LIBRARY_PATH (or equivalent) setting that
> one user has that the other doesn't.
>
> Paul




More information about the Python-list mailing list