Related: Install latest
gfortran on Windows
Caveat: Newer versions of Gfortran may require recompiling other libraries linked with Fortran compiler, such as HDF5.
Trivially switch between Gfortran compiler versions (or any other program versions) with
GCC/Gfortran 8 for Ubuntu 18.04 / 16.04 / 14.04 is available from the Ubuntu-test PPA.
Add Ubuntu-test PPA by:
add-apt-repository ppa:ubuntu-toolchain-r/test apt update
Then install the most recent Gfortran (similarly for
apt install gfortran-8
Switch between compiler versions with
- If you’re having errors getting any version of
- MacOS: install
gfortranon Mac OS via homebrew:
brew install gcc