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

OS is Ubuntu 10.04.
I need to compile some C++ code with -std=c++0x flag. But compiling doesn't work because I need 4.6.1 version.
Now, when I go to Gnu's ftp, I see two different packages:


Knowing that I need to compile C++0x code, which one should I download, and how do I install it/them?
I already installed these libraries (gmp, mpc and mpfr).

share|improve this question
Don't install gcc, instead, install g++ – Lilian A. Moraru Mar 3 '12 at 10:11

Find yourself a PPA that suits your needs, and install a GCC package from there. There are install instruction within each PPA's page.

Obviously, PPAs contain unofficial packages, so YMMV.

share|improve this answer

I think this PPA has gcc 4.6.1 : Toolchain test builds. But the installation process probably will replace other packages. Probably would be safer downloading the source and compiling it yourself.

You can also upgrade to 11.10 or install it in a VM (currently it has gcc/g++ 4.6.1).

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.