How To Install gcc-toolset-9-gcc-gfortran on CentOS 8
Introduction
In this tutorial we learn how to install gcc-toolset-9-gcc-gfortran
on CentOS 8.
What is gcc-toolset-9-gcc-gfortran
The gcc-toolset-9-gcc-gfortran package provides support for compiling Fortran programs with the GNU Compiler Collection.
We can use yum
or dnf
to install gcc-toolset-9-gcc-gfortran
on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install gcc-toolset-9-gcc-gfortran.
Install gcc-toolset-9-gcc-gfortran on CentOS 8 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install gcc-toolset-9-gcc-gfortran
using dnf
by running the following command:
sudo dnf -y install gcc-toolset-9-gcc-gfortran
Install gcc-toolset-9-gcc-gfortran on CentOS 8 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install gcc-toolset-9-gcc-gfortran
using yum
by running the following command:
sudo yum -y install gcc-toolset-9-gcc-gfortran
How To Uninstall gcc-toolset-9-gcc-gfortran on CentOS 8
To uninstall only the gcc-toolset-9-gcc-gfortran
package we can use the following command:
sudo dnf remove gcc-toolset-9-gcc-gfortran
gcc-toolset-9-gcc-gfortran Package Contents on CentOS 8
/opt/rh/gcc-toolset-9/root/usr/bin/gfortran
/opt/rh/gcc-toolset-9/root/usr/lib/gcc
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/32
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/32/finclude
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/32/finclude/ieee_arithmetic.mod
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/32/finclude/ieee_exceptions.mod
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/32/finclude/ieee_features.mod
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/32/finclude/omp_lib.f90
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/32/finclude/omp_lib.h
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/32/finclude/omp_lib.mod
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/32/finclude/omp_lib_kinds.mod
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/32/finclude/openacc.f90
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/32/finclude/openacc.mod
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/32/finclude/openacc_kinds.mod
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/32/finclude/openacc_lib.h
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/32/libcaf_single.a
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/32/libgfortran.a
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/32/libgfortran.so
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/finclude
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/finclude/ieee_arithmetic.mod
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/finclude/ieee_exceptions.mod
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/finclude/ieee_features.mod
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/finclude/omp_lib.f90
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/finclude/omp_lib.h
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/finclude/omp_lib.mod
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/finclude/omp_lib_kinds.mod
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/finclude/openacc.f90
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/finclude/openacc.mod
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/finclude/openacc_kinds.mod
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/finclude/openacc_lib.h
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/libcaf_single.a
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/libgfortran.a
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/libgfortran.so
/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/libgfortran.spec
/opt/rh/gcc-toolset-9/root/usr/libexec/gcc
/opt/rh/gcc-toolset-9/root/usr/libexec/gcc/x86_64-redhat-linux
/opt/rh/gcc-toolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9
/opt/rh/gcc-toolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/f951
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2002.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2002.libgfortran.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2003.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2003.libgfortran.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2004.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2004.libgfortran.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2005.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2005.libgfortran.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2006.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2006.libgfortran.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2007.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2007.libgfortran.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2008.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2008.libgfortran.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2009.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2009.libgfortran.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2010.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2010.libgfortran.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2011.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2011.libgfortran.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2012.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2012.libgfortran.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2013.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2013.libgfortran.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2014.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2014.libgfortran.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2015.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2015.libgfortran.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2016.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2016.libgfortran.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2017.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2017.libgfortran.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2018.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog-2018.libgfortran.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog.libgfortran.bz2
/opt/rh/gcc-toolset-9/root/usr/share/doc/gcc-toolset-9-gcc-gfortran/ChangeLog.ptr.bz2
/opt/rh/gcc-toolset-9/root/usr/share/info/gfortran.info.gz
/opt/rh/gcc-toolset-9/root/usr/share/man/man1/gfortran.1.gz
/usr/lib/.build-id
/usr/lib/.build-id/1c
/usr/lib/.build-id/1c/9c4acd04e43ca726d552e4e0b20fc2bcd77158
/usr/lib/.build-id/d1
/usr/lib/.build-id/d1/5aff339bc32319f5df13e24748d729095d45ec
References
Summary
In this tutorial we learn how to install gcc-toolset-9-gcc-gfortran
on CentOS 8 using yum and dnf.