Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
use gcc 5.x on ubuntu 14.04
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-5 g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 1

to set first priority to gcc-5

👍

спасибо =)

Thanks 👍

rrogers commented Apr 24, 2017

This works!

dtamez commented Jun 8, 2017

Thanks :)

benzkji commented Jun 24, 2017

still works for me on ubuntu 17 / zesty. ppa is not even needed!

paomian commented Sep 11, 2017

gcc7

sudo add-apt-repository ppa:jonathonf/gcc-7.1
sudo apt-get update
sudo apt-get install gcc-7 g++-7

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment