Linux serverNETWORK ADMINISTRATIONS

How to Install Devtoolset-8 on Linux | How to upgrade GCC in Linux

Upgrade GCC version 4.8.5 to 8.3.1

steps
Install Commands:
# 1. Install a package with repository for your system:
# On CentOS, install package centos-release-scl available in CentOS repository:
$ sudo yum install centos-release-scl

# On RHEL, enable RHSCL repository for your system:
$ sudo yum-config-manager –enable rhel-server-rhscl-7-rpms

# 2. Install the collection:
$ sudo yum install devtoolset-8

Run command (cmd session specific – should be used to temporarily upgrade to gcc upgrade):
# 3. Start using software collections:
$ scl enable devtoolset-8 bash

Run Command (global setting – should be used to use upgraded gcc all the time – point installed gcc to upgrade gcc with a symlink – if you don’t need old gcc for other builds):
FYI, we use this setting to permanently use upgraded gcc for all crypto builds.

# Rename old gcc
$ sudo mv /usr/bin/gcc /usr/bin/gcc.old

# sudo ln -s “intended gcc” “old installed gcc”
$ sudo ln -s /opt/rh/devtoolset-8/root/usr/bin/gcc /usr/bin/gcc

source

centos 7

Leave a Reply

Your email address will not be published. Required fields are marked *