Devtools for CentOS

Devtools for CentOS

Posted on 2014-05-28 by Ed Braaten

I needed to compile some source that required a newer version of the GNU GCC compiler than the ancient 4.4.7 20120313 that comes with my fully-up-to-date CentOS 6.5 Linux system. Following the steps below, I was able to install and use devtools-2 which contains a fully functioning 4.8.2 20140120 version of the GNU GCC compiler environment.

  1. Go to the /etc/yum.repos.d/ directory on your system and download the devtools-2.repo file from http://people.centos.org/tru/devtools-2/:
    cd /etc/yum.repos.d
    wget http://people.centos.org/tru/devtools-2/devtools-2.repo
  2. Install the gcc, binutils, fortran, and C++ packages with:
    yum install devtoolset-2-gcc
    yum install devtoolset-2-binutils
    yum install devtoolset-2-gcc-gfortran
    yum install devtoolset-2-gcc-c++
  3. Use the “scl” command to open a shell which is running in the devtools environment:
    scl enable devtoolset-2 bash
  4. No mess, no fuss! The devtools-2 environment is fully self-contained and doesn’t impact your distro’s base compiler environment.


    Copyright (C) 2014 by Ed Braaten.  All rights reserved.
    Other Blog Entries
    https://ed.braaten.net/