Skip to content

Instantly share code, notes, and snippets.

@beci
Created October 15, 2015 07:18
Show Gist options
  • Save beci/2a2091f282042ed20cda to your computer and use it in GitHub Desktop.
Save beci/2a2091f282042ed20cda to your computer and use it in GitHub Desktop.
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
@SahilTamboli23
Copy link

worked .....thanks

@Tectract
Copy link

ppa:ubuntu-toolchain-r/test

seems like it's not being updated or bugfixed properly and could even leave your Ubuntu 14.04 machine in an unbootable state. Beware...

See here a bunch of people breaking their installations of apt-get and gnome by blindly using that repo:

https://askubuntu.com/questions/777803/apt-relocation-error-version-glibcxx-3-4-21-not-defined-in-file-libstdc-so-6#

@Nukemenonai
Copy link

the following error appears when trying to compile using the flag -fsanitize=signed-integer-overflow

/usr/bin/ld: unrecognized option '--push-state--no-as-needed'
/usr/bin/ld: use the --help option for usage information

@aspenstarss
Copy link

It's work for me!
Thanks!

@mandardeshmukh03
Copy link

mandardeshmukh03 commented Dec 21, 2021

For me this worked:
sudo apt-add-repository "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu trusty main"
sudo apt-get update
sudo apt-get install gcc-5 g++-5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment