I'm attempting to run a flask app with mod_wsgi on Ubuntu 16.04. I'm having a problem setting the $LD_LIBRARY_PATH$
environment variable. I'm able to set this in my ~.bashrc
file, and as a result I am able to import all my libraries and dependencies without a problem. However it seems apache seems to erase these environment variables.
The error I'm getting in my log file is the following
ImportError: libmkl_rt.so: cannot open shared object file: No such file or directory
There are two python libraries I'm importing that require mkl. The first doesn't seem to complain. However the second library cannot be imported due to the mkl error.
I find this odd so I recompiled the second python library after setting the $LD_RUN_PATH
environment variable to the mkl paths. However it is still unable to find mkl.
How do I configure apache accordingly? All other imports work fine. I am able to run the flask scripts on their own without apache, so I'm pretty sure this is an apache problem.