Reputation: 688
I have a django app that requires Python (3.4) lxml package. I had a fair amount of trouble building the c shared libraries libxslt and libxml2 that lxml depends on in my red hat server environment. However, pip install lxml
now completes successfully and I can import and use lxml in the command line interpreter.
When I restart apache, importing lxml within my django app causes the error:
ImportError: /usr/local/lib/python3.4/site-packages/lxml/etree.cpython-34m.so: undefined symbol: exsltMathXpathCtxtRegister
I have checked that my LD_LIBRARY_PATH is set the same in both environments (/usr/lib).
I notice that when I reinstall lxml through pip, pip tells me that it is building against libxml2/libxslt found at /usr/lib64. I have removed all libxml2.so and libxslt.so files found at /usr/lib64/ and been confounded to find that pip continues to tell me that it is building against lib64, that the install completes successfully, and that lxml still works correctly at command line but not through apache.
pip also says that the detected version of libxslt that it's using in the install is 1.1.23. However, I've used strace to see that when I import using the interpreter, the library that is loaded is /usr/lib/libxslt.so.1.1.28. I don't know of any tool or technique to find out what library is being loaded through apache..
Does anyone have any theories as to what is going on or how to debug the issue? Thanks in advance!
Upvotes: 0
Views: 408