Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I plan to download and install Ubuntu 13.04 and I would like to have two compilers on my system.

First question: what is the version of gcc/g++/gfortran shipped with ubuntu 13.04 ? (is it 4.7.3 ?).

So, I would like to have gcc/g++/gfortran 4.8 as my default compiler (and 4.7.3 as a "backup"). Is there a well precompiled version avaible somewhere (compiled with the right optimizations and enabling std::thread) ? And how to download on install it ?

share|improve this question
up vote 5 down vote accepted

Yes, Raring has gcc 4.7.3 by default. However you can install gcc 4.8 from Ubuntu toolchain PPA.

You can even install latest gcc snapshot by installing gcc-snapshot package available in universe repository. (not recommended though)

share|improve this answer

The following should do the trick:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-4.8

Note, if you receive an error saying that add-apt-repository does not exist, you can install it via:

sudo apt-get install software-properties-common
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.