Skip to content

Instantly share code, notes, and snippets.

@flavindias
Forked from zuyu/ubuntu-install-gcc-6
Created April 28, 2019 14:44
Show Gist options
  • Save flavindias/655be73798340d35f105eeecb60a0e1c to your computer and use it in GitHub Desktop.
Save flavindias/655be73798340d35f105eeecb60a0e1c to your computer and use it in GitHub Desktop.
Install gcc 6 on Ubuntu
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
sudo apt-get update && \
sudo apt-get install gcc-6 g++-6 -y && \
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6 && \
gcc -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment