Fortran-77 is a very old code, who lives in 32-bit computer.

In Ubuntu-16, the compiler g++, gcc, or gfortran are “basically the same” (as far as I understand, correct me if I am wrong.) that they only support fortran-95.

In order to compile Fortran-77 code, I tried many way, but the only way is install g77 from external source, and add -m32 for the compiling flag.

The g77 compiler can be downloaded in here (I download from the web, If I violated some copy right, please let me know):

or, people can search in google by



people need to extract, change the mod of to be executable.

 tar -xzvf g77_x64_debian_and_ubuntu.tar.gz
 cd g77_x64_debian_and_ubuntu
 chmod +x ./


Hope it help. :)