Created
December 25, 2014 22:38
-
-
Save gmas/b5fd3d038905d1265485 to your computer and use it in GitHub Desktop.
switch gcc versions in debian
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#install new versions of gcc and g++ | |
sudo apt-get install gcc-4.8 g++-4.8 | |
#remove existing alternatives | |
sudo update-alternatives --remove-all gcc | |
sudo update-alternatives --remove-all g++ | |
#add new and old version to update-alternatives db | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6 | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8 | |
#choose the needed version | |
sudo update-alternatives --config gcc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment