zedong
zedong

Reputation: 453

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

My task is to put the program to docker environment, I use ubuntu container. and the program is written by fortran. When I run the program, I got this error

./cscheck.out: error while loading shared libraries: libgfortran.so.1: cannot open shared object file: No such file or directory

I have almost read all the search pages. I have tried the command ldconfig -v, but it doesn't work. And I learned that this error is because the missed libgfortran.so.1 , but in ubuntu package search page, the lowest version of libgfortran is 3. So I can't find the version 1.

Can you give me clue, I need to keep trying.

Upvotes: 0

Views: 4416

Answers (2)

Charalamm
Charalamm

Reputation: 1937

In Ubuntu 18.04, the following error:

sander: error while loading shared libraries: libgfortran.so.3: cannot open shared object file: No such file or directory

was fixed by running

sudo apt-get install libgfortran3:amd64

It could be the same for libgfortran1, by running

sudo apt-get install libgfortran1:amd64  

Also, in place of amd64 the I am aware of the following options: i386, i586, i686, x86_64.

Upvotes: 0

Where did you get this program? Rebuild it with the current gfortran if you have the source or you need to find the old libgfortran. It will be in an old release of GCC. Try to install GCC 4.1 or similar. Such an old version will not be present in current repositories, you must install it manually.

Upvotes: 1

Related Questions