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 want to downgrade GCC and G++ 4.7.2 to some older versions, 4.0 perhaps. Any assistance? I'm using Lubuntu ATM.

share|improve this question
Why would you want to do that? – dobey May 2 '13 at 19:09
I don't know why BlueBaron might want to do that, but I would do that if I had an important codebase that had been compiled with GCC 4.0 and subject to a lot of testing. On a previous job, I versioned the GCC toolchain. If we checked out a baseline from six months ago, its makefiles would point to the compiler which was used six months ago. – Kaz May 3 '13 at 22:33
There are good reasons not to use the latest, shiniest release of GCC, such as that it's a fast moving target with poor QA. – Kaz May 3 '13 at 22:36

You can install 4.4, 4.6, 4.7

sudo apt-get install gcc-4.
gcc-4.4                               gcc-4.6-plugin-dev                    gcc-4.7-locales
gcc-4.4-base                          gcc-4.6-source                        gcc-4.7-multilib
gcc-4.4-doc                           gcc-4.7                               gcc-4.7-multilib-arm-linux-gnueabi
gcc-4.4-locales                       gcc-4.7-aarch64-linux-gnu             gcc-4.7-multilib-arm-linux-gnueabihf
gcc-4.4-multilib                      gcc-4.7-aarch64-linux-gnu-base        gcc-4.7- multilib-powerpc-linux-gnu
gcc-4.4-source                        gcc-4.7-arm-linux-gnueabi             gcc-4.7-plugin-dev
gcc-4.6                               gcc-4.7-arm-linux-gnueabi-base        gcc-4.7-powerpc-linux-gnu
gcc-4.6-base                          gcc-4.7-arm-linux-gnueabihf           gcc-4.7-powerpc-linux-gnu-base
gcc-4.6-doc                           gcc-4.7-arm-linux-gnueabihf-base      gcc-4.7-source
gcc-4.6-locales                       gcc-4.7-base                          
gcc-4.6-multilib                      gcc-4.7-doc                           

You need to install base package for example

  sudo apt-get install gcc-4.4-base
share|improve this answer
Can you get 4.0 this way? – Kaz May 3 '13 at 22:35
nope ...only starting from 4.4 – Qasim May 4 '13 at 2:32
do this sudo apt-get install gcc then press " Tab " key twice – Qasim May 4 '13 at 2:33

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.