Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When trying to start a certain program, I got the following error message:

error while loading shared libraries: foo.so.0: cannot open shared object file: No such file or directory

Therefore I built the required library and installed it under the directory /usr/local/lib/. However, after building the library, there were only the files foo.so, foo.so.1 and foo.so.1.0.8 under /usr/local/lib/. So I created an additional symbolic link to foo.so.1.0.8 named foo.so.0. I checked that /usr/local/lib is included in some file under /etc/ld.so.conf.d/ and started sudo ldconfig.

Unfortunately ldconfig seems to ignore my self-created symbolic link. ldconfig -v prints only the following line:

foo.so.1 -> foo.so.1.0.8

ldconfig -p prints only the following two lines:

foo.so.1 (libc6,x86-64) => /usr/local/lib/foo.so.1

foo.so (libc6,x86-64) => /usr/local/lib/foo.so

There is not a blind bit of the file foo.so.0. What do I have to do?

share|improve this question
    
What are you trying to install / run and how did you install it? Sounds as if you installed a package outside of apt (apt-get or the software center). –  bodhi.zazen Feb 18 at 23:30
    
I downloaded and built an Open MPI release as I have to run a program which requires it. –  user1494080 Feb 18 at 23:36
    
did you try installing openmpi from the repos ? sudo apt-get install openmpi-bin ? Otherwise , link to what you installed please. –  bodhi.zazen Feb 18 at 23:37
    
I downloaded the tarball from the official website and did the following: open-mpi.org/faq/?category=building#easy-build –  user1494080 Feb 18 at 23:41
1  
I can not tell from what you posted, it is hard to follow foo and foo.0 without knowing what you are doing and output of a few commands such as ls and also the exact error message you are getting. –  bodhi.zazen Feb 18 at 23:55

1 Answer 1

From what I remember in ubuntu, just adding symlinks in /usr/local/lib may not be sufficient. We need update ld.so.conf entry corresponding to this to let ldconfig know what symlinks it has to create for us.

Like bodhi.zazen mentioned, installing from apt is simpler, because apt would very likely setup ld.so.conf files as well.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.