Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compile Fortran 77 files in linux? [closed]

I need a compiler for Fortran 77 in linux.

Are there any free compilers out there that people use?

I've heard about g77, but I can't find the rpm or how to install it in linux.

Thanks!

like image 722
chris Avatar asked Jul 24 '09 05:07

chris


2 Answers

GCC's Fortran compiler name has changed: g77 has been replaced by gfortran, which handles Fortran 95 and possibly more recent variants.

The package in Ubuntu is called gfortran:

sudo apt-get install gfortran

(or use synaptic)

The package in Fedora is called gfortran and is part of gcc, which you probably already have:

sudo yum install gcc

(or use pirut)

Similar searches should work for your distribution as well.

Update: On RedHat 4.1.2 the package seems to be called gcc4-gfortran. Incidentally, you ought to be able to search for this with yum, and that may be the best answer to your question:

yum search "*fortran*"
like image 85
quark Avatar answered Sep 28 '22 00:09

quark


For Amazon Linux:

 sudo yum --enablerepo=epel install gcc-gfortran
like image 29
Nate Avatar answered Sep 28 '22 00:09

Nate