As we all know, GCC does not support "make Uninstall ". A recommended installation method is to install GCC in a path you specify. When you do not need a GCC version number, you only need to remove the corresponding version number.
If you already have an old version number in your system, the simplest method is:
1) join? Personal package archive in the repositories
2. repositoris)
3) upgrade procedure
sudo add-apt-repository ppa:ubuntu-toolchain-r/testsudo apt-get update
Join? New Ppa (peronal package archive) to System
Delete alternative
sudo update-alternatives --remove-all gcc sudo update-alternatives --remove-all g++
Then:
sudo apt-get install gcc-4.8sudo apt-get install g++-4.8
Install GCC and G ++ as alternatives
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20sudo update-alternatives --config gccsudo update-alternatives --config g++
Finally:
sudo apt-get updatesudo apt-get upgrade -ysudo apt-get dist-upgrade
Translator's note:
Trial upgrade Effect
Terminal input: gcc-V
Terminal input is as follows:
...
GCC version 4.8.1 (Ubuntu 4.8.1-2ubuntu1 ~ 10.04.1)
Address: http://askubuntu.com/questions/312620/how-do-i-install-gcc-4-8-1-on-ubuntu-13-04