-
-
Save startergo/02cada21df26dfb9eed24be232892ac1 to your computer and use it in GitHub Desktop.
Install gcc 9 on Ubuntu LTS 12.04,14.04,16.04 and 18.04
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
#!/usr/bin/env sh | |
sudo apt-get update -y && \ | |
sudo apt-get upgrade -y && \ | |
sudo apt-get dist-upgrade -y && \ | |
sudo apt-get install build-essential software-properties-common -y && \ | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ | |
sudo apt-get update -y && \ | |
sudo apt-get install gcc-9 g++-9 -y && \ | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9 && \ | |
sudo update-alternatives --config gcc | |
select gcc-9 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment