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

The newest Ubuntu (10.10) has gcc version 4.4.4, but I need 4.2.1 for compilation issues. The library that I'm using requires me to use 4.2.1.

How can I downgrade the gcc to a specific version?

share|improve this question
up vote 3 down vote accepted

You can't really downgrade gcc. However, if you don't need 4.2.1 specifically, but 4.2.x, you can install Ubuntu 8.04 which will continue to have the gcc-4.2 packages supported for another 2 years.

share|improve this answer
Once installed, you can usually build your library by specifying the environment variable "CC" as "CC=gcc-4.2 .../build/command" – Kees Cook Apr 1 '11 at 0:04

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.