Install modern compilers in CentOS

less than 1 minute read

Very often we need a more modern compiler than is included in base CentOS, particularly for HPC systems. It does require admin (sudo) privileges to install the programs, but they can be loaded by any user thereafter. DevToolset comes from RHEL.

Install

The one-time install will be like the gfortran example below:

yum install centos-release-scl
yum install devtoolset-7-gcc devtoolset-7-gcc-gfortran

Load

You can type the following or put it in the user’s .bashrc

scl enable devtoolset-7 bash

Verify

gfortran --version

Tags:

Categories:

Updated:

Leave a comment