Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Hive10/3dcb389113395da3e9bf3ef5814e73d6 to your computer and use it in GitHub Desktop.
Save Hive10/3dcb389113395da3e9bf3ef5814e73d6 to your computer and use it in GitHub Desktop.
How to install gcc-4.8 and g++-4.8 on Ubuntu 12.04
# link: http://askubuntu.com/questions/271388/how-to-install-gcc-4-8?newreg=6c2b1c109685438c8bc7b37a87cefb21
# link to the repository: https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test?field.series_filter=precise
# Open a terminal(Ctrl+Alt+t) and run the following commands:
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
# install gcc
sudo apt-get install gcc-4.8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
# install g++
sudo apt-get install g++-4.8
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50
# check gcc and g++ version
gcc --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment