Ubuntu 20.04 installing gfortran-6/ libgfortran.so .3

When I try to run the do command under GAMIT on Ubuntu 20.04, it shows:

root@DESKTOP-LF0EAC9:/etc/apt# doy
doy: error while loading shared libraries: libgfortran.so.3: cannot open shared object file: No such file or directory

among libgfortran.so . 3 depending on gfortran-6, try to install gfortran-6:

root@DESKTOP:/etc/apt# apt install gfortran-6
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package gfortran-6

The problem here is that Ubuntu 20.04 does not support G + ± 6. Add the following source to/etc/apt/ sources.list For the method of adding source, see the link

deb http://gb.archive.ubuntu.com/ubuntu/ bionic main universe


sudo apt-get update

Install GCC + + – 6

apt-get install g++-6

Setting the default version of GCC

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 6

Install gfortran-6

 apt install gfortran-6

Install successfully, run doy

root@DESKTOP-LF0EAC9:/etc/apt# doy 2020 001
Date 2020/01/01  0:00 hrs, DOY   1 JD  2458849.5000 MJD  58849.0000
GPS Week  2086 Day of week  3, GPS Seconds 259200 Day of Week Wed
Decimal Year 2020.000000000 GRACE Seconds 631108800.0

Run successfully

Read More: