Reputation:
When I try to install libgfortran.so.3
on Ubuntu 20.04 using:
sudo apt-get install libgfortran3
it shows:
E: Unable to locate package libgfortran3
How can I install Fortran on 20.04?
Upvotes: 8
Views: 32728
Reputation: 21
To install libgfortran libraries in Ubuntu 20.04:
Use this link to download the files. Click here
Upvotes: 1
Reputation: 111
The problem here is that 20.04 doesn't support g++-6. To get around this you need a multi-step process:
Put a temporary repository into /etc/apt/sources.list. For me that was deb http://gb.archive.ubuntu.com/ubuntu/ bionic main universe
Now you can install gcc version 6 sudo apt-get install g++-6
Make that the default version sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 6
Now install gfortran sudo apt-get install libgfortran3
Make sure it works strings /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0 | grep GFORTRAN*
Upvotes: 11
Reputation: 11
libgfortran3 is not supported any more in Ubuntu 20.04 as it depends on an older version of gcc, which is no longer maintained in this version of the distribution. You can install a later version of libgfortran using:
sudo apt-get install libgfortran5
Upvotes: 0