I've had an issue with cxOracle. In a python shell, 'import
cx_Oracle' failed with:
ImportError: libclntsh.so.10.1: cannot open shared object file: No
such file or directory
I was able to correct this for python shells with export
LD_LIBRARY_PATH, but a modwsgi app still fails with the same error.
Does anyone know how I'd correct this?
Thanks,
Dave
~ro
~ro
On Apr 17, 2008, at 1:53 PM, David Durham, Jr. wrote:
>
It was/is set. Right now, I have a solution where I start apache with
LD_LIBRARY_PATH=... apachectl start
Compiling with LD_LIBRARY_PATH set will make no difference. What you
can do though is when compiling/installing the Oracle Python wrappers,
set LD_RUN_PATH to the library directory containing the Oracle
libraries. For example:
LD_RUN_PATH=/some/path/oracle/lib python setup.py build
LD_RUN_PATH=/some/path/oracle/lib python sudo setup.py install
This is mentioned in section 'Unable To Find Python Shared Library' of:
http://code.google.com/p/modwsgi/wiki/InstallationIssues
Although it talks about this issue for mod_wsgi, same can be applied
to your extension module.
The alternative is if your Apache installation has an 'envvars' file
in same directory as Apache httpd excutable, add to that:
LD_LIBRARY_PATH=/some/path/oracle/lib
export LD_LIBRARY_PATH
If no 'envvars' file with your Apache installation, would need to be
set in Apache startup scripts where it invokes apachectl.
Graham
Thanks, I'll probably go with this option. I'll post if something
goes wrong, but it sounds like this is exactly what I need.
-Dave
you can also define the runtime library path with:
CFLAGS="-Wl,--rpath=/path/to/lib"
Or something similar. On some system the man page said a single
hyphen but it silently failed unless you used to hyphens. I don't
recall if that was RHEL or BSD.
But if LD_RUN_PATH works then go for it.
Sorry I misspoke earlier