473,666 Members | 2,058 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

help on import libxml2

Hi,

I have this weird situation where on the same machine(solaris 8,
python 2.5), one user can do this with no problem:
>>import libxml2
libxml2
<module 'libxml2' from '/usr/local/lib/python2.5/site-packages/
libxml2.py'>
>>>

While the another one get this:
>>import libxml2
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
xmlXIncludeProc essFlags: referenced symbol not found
>>>
No PYTHON* environment variables are set for either user.

Any help would be appreciated.

Jianbing

Aug 14 '08 #1
2 2896
On 14 Aug, 22:43, jianbing.c...@g mail.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
xmlXIncludeProc essFlags: 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
Aug 14 '08 #2
Paul,

Thanks. This helped.

Jianbing

On Aug 14, 4:10*pm, Paul Boddie <p...@boddie.or g.ukwrote:
On 14 Aug, 22:43, jianbing.c...@g mail.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
xmlXIncludeProc essFlags: 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
Aug 15 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2184
by: laura | last post by:
newbie... expath vs libxml2... libxml2 is an implementation of dom expath is a sax parser both comes with php installation (ie 4.3) both need to have php recompiled:
1
1838
by: Logan | last post by:
I always get the following error message when trying to import either the libxml2 or the libxslt module (Python 2.3 / Linux): ImportError: /usr/lib/python2.3/site-packages/libxml2mod.so: undefined symbol: libxml_xmlCreateOutputBuffer (I have Python 2.2 and Python 2.3 installed. Using Python 2.2, the libxml2/libxslt Python bindings work just fine.)
1
1879
by: Brian Donovan | last post by:
Hi All, I'm trying to get xpath to work with the libxml2 python bindings. I'm using the following doc = libxml2.parseFile(filename) result = doc.xpathEval('//*') My test XML file has 10 nodes in it and I'm trying to get an element named 'element' (from an relaxng schema).
1
1621
by: Frans Englich | last post by:
Hello all, I have a couple of questions related to module importing. 1) When I start my Python program with `python foo.py` instead of simply adding a interpreter comment on the first line and do `./foo.py`, some "local" imports fails, I guess because current working directory is different. Is CWD the only difference between running `python foo.py` and `./foo.py`? What is the recommended way? (I guess security is one aspect that can...
1
2175
by: bdecker | last post by:
Hello, I was hoping that someone here can please answer two questions concerning libxml2 python module use: 1. Is this snippet correct? doc = libxml2.parseDoc(readfile(filename)) ctxt = doc.xpathNewContext() ctxt.xpathRegisterNs("xlink","http://www.w3.org/1999/xlink")
4
2243
by: ankit | last post by:
I am parsing xml file using libxml2 and for navigating the document object tree I want to use minidom. Is it possible. Can anyone give me any example for the same ?
1
4444
by: Scott | last post by:
I'm trying to install PHP 5.1.2 on Fedora 4. Everything on configure goes ok until this: checking libxml2 install dir... /usr/lib checking for xml2-config path... configure: error: xml2-config not found. Please check your libxml2 installation. Here's my configure line: ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=usr/local/mysql
0
1594
by: Reestit Mutton | last post by:
I'm trying to get the mysqli object-oriented syntax to work in php. I understand that I have to have at least version 5 of php - I've therefore opted for version 5.1.4. The remainder of my setup is as follows php 5.1.4 mysql 4.1.10a-2.RHEL4.1 httpd-2.0.52-12.2.ent Redhat Enterprise Linux 4 To be able to configure and compile the source of php to work with
6
4543
by: saumya.agarwal | last post by:
Hi, I am using libxml2 for xml parsing. When the client application sends data to libxml2 in UTF-8 format, it works fine. But, I have a scenarion in which the client application sends data to libxml2 parser in SHIFT-JIS format. The following error is thrown by libxml2 -
0
8356
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8781
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7386
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5664
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4368
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2771
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1775
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.