Celeb Glow
general | March 28, 2026

Error loading share libraries: libgfortran.so.3 under Ubuntu 18.04.1

I recently installed Ubuntu 18.04.1. Now, when I try to run a mpi Fortran code, there is an error loading the shared library: libgfortran.so.3 and the code does not execute. I tried to reinstall gfortran, mpich, and gcc by removing the software, but I cannot remove them using sudo apt-get remove gfortran because the removal aborts when I am asked whether I want to continue. When I try to make an executable, an unknown file type is generated for the executable.

1

2 Answers

According to packages.ubuntu.com you should install libgfortran3 package, as it contains /usr/lib/x86_64-linux-gnu/libgfortran.so.3:

sudo apt-get install libgfortran3

Note: if your software is 32-bit, then install two corresponding packages:

sudo apt-get install lib32gfortran3 libx32gfortran3
1

It is true that some packages are not supported in Ubuntu 20.04, which is because of there dependency on previous versions of gcc or libgfortran.

In my case I was not able to install Seisan V11 on my Ubuntu 20.04. Apparently this software should not be supporting in Ubuntu 20.04 because of error in shared libraries.

But some how I managed to solve the problem and now Seisan is working, although it has some back trace errors.

Make sure to go to this site and to do the following

One may use this site if they face any problem in editing /etc/apt/sources.list.How do I add a line to my /etc/apt/sources.list?

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy