Re: [AMBER] error while loading shared libraries:

From: Jason Swails <>
Date: Mon, 25 Nov 2013 15:10:38 -0500

On Mon, 2013-11-25 at 11:43 -0800, Jio M wrote:
> Dear All,
> I have installed number of times amber on different systems before and now I am trying to install Amber12+Ambertool13
> ./configure gnu
> But I get error:
> Testing the gfortran compiler:
> gfortran -O0 -o testp testp.f
> ./testp: error while loading shared libraries: cannot open shared object file: No such file or directory
> Error: Unable to compile a Fortran program using gfortran -O0
> I tried to find in archive but not much help

This means that the linker cannot find at run-time.
This usually happens when you are using compilers that are _not_ found
in /usr/bin and the directories with the libraries are not located by
your linker (ld).

The typical solution is to find where these libraries are located and
add them to LD_LIBRARY_PATH. In bash, this would be something like:

swails.Batman ~ $ locate

swails.Batman ~ $ export

You will want to put the latter command into your .bashrc file so it
appears every time you log in. [1]


[1] An alternative is to modify the configuration file for the ld loader
(on my machine it is /etc/ via configurable files
in /etc/ Using LD_LIBRARY_PATH is easier and safer if
you're not sure what you're doing.

Jason M. Swails
Rutgers University
Postdoctoral Researcher
AMBER mailing list
Received on Mon Nov 25 2013 - 12:30:03 PST
Custom Search