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?
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?
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*
apt-get update
somewhere between step 1 and 2. This will help a lot of new comers :-) –
Caveman sudo apt-get install g++-6
Package g++-6 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'g++-6' has no installation candidate –
Threaten To install libgfortran libraries in Ubuntu 20.04:
Use this link to download the files. Click here
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
© 2022 - 2024 — McMap. All rights reserved.