Enable rhscl repo for RHEL 6

To use the devtoolset, we need to enable the rhscl repo if we are running
RHEL 6. This fix most likely only works for the RHEL 6 images on AWS.
This commit is contained in:
Markus Mäkelä 2018-06-11 14:54:20 +03:00
parent 0627e8dc86
commit 6927e67a6d
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -75,7 +75,12 @@ else
if [ $? == 0 ]
then
# Enable the devtoolkit to get a newer compiler
sudo yum -y install centos-release-scl
# CentOS: install the centos-release-scl repo
# RHEL: enable the existing repo (seems to be rhui-REGION-rhel-server-rhscl on AWS)
sudo yum -y install centos-release-scl || \
sudo yum-config-manager --enable rhui-REGION-rhel-server-rhscl
sudo yum -y install devtoolset-4-gcc-c++
source /opt/rh/devtoolset-4/enable