Installing a Modern GCC Quickly with Software Collections

From GlueXWiki
Revision as of 22:34, 2 March 2016 by Nsparks (Talk | contribs)

Jump to: navigation, search

Software Collections technology provides a simple non-intrusive way to install modern/non-default software packages on CentOS/RHEL 6. GCC is notorious for taking a long time to build from source. This guide will help you quickly install a software collection named devtoolset-3-toolchain, which includes GCC 4.9.2. These instructions are based on the instructions at

First, install the CentOS software collections repository, and then install the toolchain part of the Devtoolset-3 software collection.

yum update
yum install centos-release-scl-rh
yum install devtoolset-3-toolchain

To enable the devtoolset software collection in a bash shell do the following:

scl enable devtoolset-3 bash

Alternatively, you can run a single command in the software collection like this

scl enable devtoolset-3 ‘gcc -v'