Re: [AMBER] error while loading shared libraries: libgfortran.so.3

From: Jason Swails <jason.swails.gmail.com>
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: libgfortran.so.3: 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 libgfortran.so.3 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 libgfortran.so.3
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.3/libgfortran.so.3
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.3/libgfortran.so.3.0.0
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.3/32/libgfortran.so.3
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.3/32/libgfortran.so.3.0.0

swails.Batman ~ $ export
LD_LIBRARY_PATH=/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.3:
$LD_LIBRARY_PATH

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

HTH,
Jason

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

-- 
Jason M. Swails
BioMaPS,
Rutgers University
Postdoctoral Researcher
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Nov 25 2013 - 12:30:03 PST
Custom Search