How do I install g77 in ubuntu 20.04

3.7k Views Asked by At

I've been looking for a way to install g77 in ubuntu 20.04 but it seems it is not supported anymore and I can't find anywhere a way to do this. I need it to run some codes that required specifically g77. Is there any way to do this?

1

There are 1 best solutions below

0
Jonatan Öström On

You don't need specifically g77. Just install gfortran. It compiles the 77 standard too.

You can also add the flag -std=legacy, to avoid warnings about legacy code.

There is even the f77 executable included when installing gfortran but it is merely a symbolic link to gfortran. So do

sudo apt install gfortran
gfortran -std=legacy this_old_code.f