Super User is a question and answer site for computer enthusiasts and power users. 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 am trying to install GCC version 3.2 using apt-get. But it complains the following

root@chid-VirtualBox:/home/chid/Downloads# apt-get install gcc=3.2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Version '3.2' for 'gcc' was not found

I even tried with other version numbers found in the gcc website. But no luck. how to proceed with this.

share|improve this question

The version you want to install needs to exist in repositories you have in your apt sources (/etc/apt directory contains various apt settings including added repositories). You can add a repository that you know that has the version you're looking for (or a PPA if you're on Ubuntu-derived distro).

You need to find the repository on the internet that has the version of the package (in this case gcc 3.2) and it should contain a line like:

deb version foobar

You should add that line to /etc/apt/sources.list and then do:

$ apt-get update
$ apt-get install gcc=3.2

Then it will find GCC 3.2 in your newly added repository. However, do note that it will most likely overwrite system's version of GCC and that can cause all sorts of trouble and is not advised unless you really know what you are doing or the system is just a virtual machine for running that particular software you need to build.

You might also need to add the GPG key for the repository and the website containing the sources.list line will likely contain information about how to do so.

share|improve this answer
Can you provide those commands to do so? This answer would be 100 times better if you did. – Ramhound May 16 '13 at 12:11
@Bojan: Thanks for your answer. But can you please be little more elaborate. I could hardly understand. I am not-so-linux guy. so zzZZZ.... – CHID May 16 '13 at 13:37
@Bojan Markovic: can you please tell me how "to find the repository on the internet that has the version of the package"? EDIT: I need GCC 4.4.7 which was released on March 13, 2012. – Campiador Nov 17 '15 at 2:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .