Created
August 4, 2020 16:15
-
-
Save ric-bianchi/bc4b8da2405a27d7af5abe9910f8970c to your computer and use it in GitHub Desktop.
Install a modern GCC on Centos 7. Tested with GCC 9.
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
# By default, only GCC 4.8 is installed with devtools on Centos7. | |
# So here we will install a recent version of GCC. | |
# Source: https://linuxize.com/post/how-to-install-gcc-compiler-on-centos-7/ | |
# 1. Install the SCL. | |
sudo yum install centos-release-scl | |
# 2. See what versions are available. | |
sudo yum search devtoolset | |
# 3. Pick one and install it. The `9` will install GCC 9. | |
sudo yum install devtoolset-9 | |
# 4. Enable the new compiler in your shell | |
scl enable devtoolset-9 bash # if you use `fish`, replace `bash` with `fish` | |
# 5. Verify the version | |
gcc --version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment