11

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.

N0rbert
  • 99,918
  • I believe you need to install libgfortran. Sorry I don't know which version you'll require, but https://packages.ubuntu.com/search?suite=bionic&keywords=libgfortran shows your options (libgfortran-9-dev where 9 = version you need for mpi) – guiverc Sep 02 '18 at 07:40

2 Answers2

14

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
N0rbert
  • 99,918
0

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 https://stackoverflow.com/a/65956351/16305143

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?