Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I set a LD_LIBRARY_PATH in ubuntu 12.04?

in .bashrc


in /etc/environment


The file exists

ls /home/ubuntu/blpapi_cpp/Linux/ 

sudo ldconfig

And yet I still get a importError: cannot open shared object file: No such file or directory

Traceback (most recent call last):
  File "/home/ubuntu/workspace/druidry-codebase/", line 4, in <module>
    import blpapi
  File "/usr/local/lib/python2.7/dist-packages/blpapi/", line 5, in <module>
    from .internals import CorrelationId
  File "/usr/local/lib/python2.7/dist-packages/blpapi/", line 50, in <module>
    _internals = swig_import_helper()
  File "/usr/local/lib/python2.7/dist-packages/blpapi/", line 46, in swig_import_helper
    _mod = imp.load_module('_internals', fp, pathname, description)
ImportError: 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


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

Browse other questions tagged or ask your own question.