[SciPy-user] missing libacml.so when using cgi script
Robert Kern
robert.kern at gmail.com
Sun Jul 22 20:33:11 EDT 2007
JJ wrote:
> Hello all:
> I am developing a website, initially on my local
> machine using the apache httpd server. My linux box
> has scipy/numpy installed, and they work fine from a
> terminal. However, I need to use the programs in a
> cgi script and am having problems getting them to
> import. In my bashrc file (for a terminal) I have an
> export LD_LIBRARY_PATH statement that leads to my
> libacml.so file. However, when I try to import scipy
> from a cgi script I get the following error:
>
> File
> '/usr/lib64/python2.4/site-packages/scipy/optimize/lbfgsb.py",
> line 30, in ? import _lbfgsb ImportError:
> libacml.so: cannot open shared object file: No such
> file or directory
>
> Numpy does import just fine. I tried using the
> following in the cgi script but it did not correct the
> problem:
>
> if os.environ.has_key('LD_LIBRARY_PATH')==False:
> os.environ['LD_LIBRARY_PATH'] = path to lib
> else:
> os.environ['LD_LIBRARY_PATH'] =
> os.environ['LD_LIBRARY_PATH'] + path to lib
This won't work. The LD_LIBRARY_PATH environment variable needs to be set before
the process starts, not just before the library is loaded. Read the Apache
documentation for how to set up the environment for your CGI scripts.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the SciPy-User
mailing list