Install GFotran 8 on Ubuntu Linux LTS: 18.04, 16.04 and 14.04

Post Reply
User avatar
Eli
Senior Expert Member
Reactions: 185
Posts: 5452
Joined: 9 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#1

Gfortran is the name of the GNU Fortran project, developing a free Fortran 95/2003/2008 compiler for GCC, the GNU Compiler Collection. Gfortran is in most cases required to compile binary packages for various software applications, especially, before executing/running them or during/for installation.

For example, with gfortran installed, python setup.py make or other standard setup commands can be used to build the Fortran library on all systems, including Windows without directly using a Makefile.

GCC/Gfortran 8 for Ubuntu 18.04 / 16.04 / 14.04 is available from the Ubuntu-test PPA, and installing Gfortran (in this case 8.2) is as easy as following the steps below.

Add Ubuntu-test PPA, and then update package repositories:

  1. sudo add-apt-repository ppa:ubuntu-toolchain-r/test
  2. sudo apt-get update


Next install the most recent Gfortran (by the time of posting this topic) (similarly for gcc-8, g++-8):

  1. sudo apt install gfortran-8


Check the version you installed by

  1. $gfortran-8 --version


GNU Fortran (Ubuntu 8.2.0-1ubuntu2~18.04) 8.2.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Newer versions of Gfortran may require recompiling other libraries linked with Fortran compiler, such as HDF5. Check here how to switch between various Gfortran compiler versions with update-alternatives.
0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Linux and Unix Based Operating Systems”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 0 guests