This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Emboss Shared Libraries

I installed EMBOSS yesterday on a system running Ubuntu. I did the canonical './configure; make; sudo make install' and I didn't see any errors. However, today I ran getorf and got the following error.

/usr/local/bin//getorf: error while loading shared libraries: libacd.so.6: cannot open shared object file: No such file or directory

I checked, and there is a copy of this file both in $installDir/ajax/acd/.libs/ and /usr/local/lib. Indeed, when I linked /usr/local/lib/libacd.so.6 to /usr/lib/libacd.so.6, it did not complain about this library any more--it complained about another one! How do the binaries know where to find the libraries? Is there some configuration or environmental variable I am not setting correctly?

I know that this question might be general to Linux/Unix, but I hope it's specific enough to EMBOSS to bring up in this community.

linux

4 answers

Check that ldconfig has been run and is configured to include /usr/local/lib in its search path. The relevant config file is /etc/ld.so.conf (or similar). E.g. mine contains

/usr/local/lib
/usr/X11R6/lib

Then run

sudo ldconfig

You should never need to twiddle with LD_LIBRARY_PATH directly.

Thanks for the explanation of ldconfig!

Will the wonders ever cease ... I have been twiddling with the LD_LIBRARY_PATH for a decade or more ... somehow I never read about ldconfig

Often on ubuntu linux you can solve this type of problem by running:

$ sudo ldconfig

that updates the links for the linker.

How do the binaries know where to find the libraries? Is there some configuration or environmental variable I am not setting correctly?

The path to the dynamic libraries is usually stored in the variable $LD_LIBRARY_PATH

I've read a lot recently saying that the $LD_LIBRARY_PATH variable is not a good long term solution, but was designed for testing new libraries. A lot of people cite problems when permanently adding non-default libraries to $LD_LIBRARY_CONFIG. Was EMBOSS designed to rely on this environmental variable?

No, as explained in the accepted answer EMBOSS installs to /usr/local/lib, you just have to use ldconfig to add that path because it's not the Ubuntu default.

If you are running ubuntu you should try to install EMBOSS through apt-get.

sudo apt-get install emboss-data emboss-doc embassy-domainatrix embassy-domalign

Log in to answer this question.