- sudo add-apt-repository ppa:ubuntu-toolchain-r/test
- sudo apt-get update
- sudo update-alternatives --remove-all gcc
- sudo update-alternatives --remove-all g++
- sudo apt-get install gcc-4.8
- sudo apt-get install g++-4.8
- sudo apt-get install gcc-4.8-multilib
- sudo apt-get install g++-4.8-multilib
- sudo apt-get install gcc-4.8-doc
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20
- sudo update-alternatives --config gcc
- sudo update-alternatives --config g++
-
- sudo apt-get update
- sudo apt-get upgrade -y
- sudo apt-get dist-upgrade
http://askubuntu.com/questions/312620/how-do-i-install-gcc-4-8-1-on-ubuntu-13-04
- http://blog.csdn.net/csfreebird/article/details/9626577