Skip to content

Instantly share code, notes, and snippets.

@zdne
Created August 28, 2013 13:31
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zdne/6366103 to your computer and use it in GitHub Desktop.
Save zdne/6366103 to your computer and use it in GitHub Desktop.
Install GCC 4.7 on Ubuntu Precise
$ sudo apt-get install python-software-properties
$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
$ sudo apt-get update
$ sudo apt-get install gcc-4.7 g++-4.7
$ 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.7 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7
$ sudo update-alternatives --config gcc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment