How do I set a LD_LIBRARY_PATH in ubuntu 12.04?
in .bashrc
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/ubuntu/blpapi_cpp/Linux
in /etc/environment
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/ubuntu/blpapi_cpp/Linux
The file exists
ls /home/ubuntu/blpapi_cpp/Linux/libblpapi3_64.so
/home/ubuntu/blpapi_cpp/Linux/libblpapi3_64.so
sudo ldconfig
And yet I still get a importError: libblpapi3_64.so: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "/home/ubuntu/workspace/druidry-codebase/test.py", line 4, in <module>
import blpapi
File "/usr/local/lib/python2.7/dist-packages/blpapi/__init__.py", line 5, in <module>
from .internals import CorrelationId
File "/usr/local/lib/python2.7/dist-packages/blpapi/internals.py", line 50, in <module>
_internals = swig_import_helper()
File "/usr/local/lib/python2.7/dist-packages/blpapi/internals.py", line 46, in swig_import_helper
_mod = imp.load_module('_internals', fp, pathname, description)
ImportError: libblpapi3_64.so: cannot open shared object file: No such file or directory
How do I resolve this?
Best Answer
I added a line for LD_LIBRARY_PATH to my c++ SDK director in .profile and that fixed the issue.