Last active
          September 11, 2023 11:01 
        
      - 
      
 - 
        
Save mhart/841afde086604e7b4a86fa140480c84d to your computer and use it in GitHub Desktop.  
    Get SCL (and GCC 7) working on Amazon Linux 2017.03
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | yum install -y iso-codes # Needed for scl-utils-build | |
| curl -O http://vault.centos.org/6.5/SCL/x86_64/scl-utils/scl-utils-20120927-11.el6.centos.alt.x86_64.rpm | |
| curl -O http://vault.centos.org/6.5/SCL/x86_64/scl-utils/scl-utils-build-20120927-11.el6.centos.alt.x86_64.rpm | |
| curl -O http://mirror.centos.org/centos/6/extras/x86_64/Packages/centos-release-scl-rh-2-3.el6.centos.noarch.rpm | |
| curl -O http://mirror.centos.org/centos/6/extras/x86_64/Packages/centos-release-scl-7-3.el6.centos.noarch.rpm | |
| rpm -Uvh *.rpm # Had to run this twice? Get an error first time, maybe Docker related | |
| rm *.rpm | |
| yum install -y devtoolset-7-gcc-c++ devtoolset-7-make devtoolset-7-build | |
| scl enable devtoolset-7 bash | |
| gcc --version # gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5) | |
| g++ --version # g++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5) | 
In my case this worked:
curl -O http://mirror.centos.org/centos/7/os/x86_64/Packages/scl-utils-20130529-19.el7.x86_64.rpm
curl -O http://mirror.centos.org/centos/7/os/x86_64/Packages/scl-utils-build-20130529-19.el7.x86_64.rpm
curl -O http://mirror.centos.org/centos/7/extras/x86_64/Packages/centos-release-scl-rh-2-3.el7.centos.noarch.rpm
curl -O http://mirror.centos.org/centos/7/extras/x86_64/Packages/centos-release-scl-2-3.el7.centos.noarch.rpm
    
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
I get this when trying to run
rpm -Uvh *.rpm, but I on Amazon Linux 2018.3