Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
Could you try to run the command as this: sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/ubuntu/blpapi_cpp/Linux ldconfig See if the problem persist or not. –  Raymond Tau Jul 30 '13 at 15:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.