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 install a previous version of gcc to make Intel compilers work correctly.

Can I use apt-get to install? If so, which repository should I use?

Any help is appreciated.

share|improve this question
possible duplicate of Old version of gcc for new Ubuntu – Ringtail Nov 3 '12 at 1:06
using " sudo apt-get remove gcc" just broke up my bumblebee/optimus installation, days of work. use it with caution. – user152081 Apr 25 '13 at 16:16

I removed gcc (4.7) and install gcc-4.6. I actually don't think that the first step is necessary here, you might just be able to have gcc 4.7 and 4.6 installed alongside.

 sudo apt-get remove gcc
 sudo apt-get install gcc-4.6 g++-4.6
 sudo ln -s /usr/bin/gcc-4.6 /usr/bin/gcc
 sudo ln -s /usr/bin/g++-4.6 /usr/bin/g++
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.