Skip to content

Instantly share code, notes, and snippets.

@421p
Created January 1, 2017 15:32
Show Gist options
  • Save 421p/f5a597413ba8ab789fb456b6ed695bb7 to your computer and use it in GitHub Desktop.
Save 421p/f5a597413ba8ab789fb456b6ed695bb7 to your computer and use it in GitHub Desktop.
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-snapshot -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 && \
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment