Skip to content

Instantly share code, notes, and snippets.

@weaponsforge
Last active September 24, 2020 10:50
Show Gist options
  • Save weaponsforge/17f4d2d236ff6f6b711f41c66203e9cb to your computer and use it in GitHub Desktop.
Save weaponsforge/17f4d2d236ff6f6b711f41c66203e9cb to your computer and use it in GitHub Desktop.
GCC 9 installation for Ubuntu 18.04
// NOTE: sudo apt autoremove (when prompted)
sudo apt-get update -y &&
sudo apt-get upgrade -y &&
sudo apt-get dist-upgrade -y &&
sudo apt-get install -y build-essential linux-headers-`uname -r`
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment