Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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 http://example.org/debian 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
1  
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

Your Answer

 
discard

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.