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

Is there a repository containing packages for old versions of gcc, for the latest Ubuntu. I want to install gcc3 alongside gcc 4, for programs that need gcc3 specifically.

share|improve this question
up vote 8 down vote accepted

Or alternatively to the Debian snapshots Elazar posted in his answer, you can use the Ubuntu package repositories for the older Ubuntu releases:

Add them to the /etc/apt/sources.list as Elazar already described:

deb hardy universe
deb-src hardy universe

The Hardy Universe repository is the one that contains gcc-3.4.

share|improve this answer

You can use debian snapshots. Add the following lines to /etc/apt/sources.list

deb lenny main
deb-src lenny main
deb lenny/updates main
deb-src lenny/updates main

Now do

$ apt-get update
$ apt-get install g++-3.4

And you're set!

This works for many other old packages, make sure you select the correct timestamp, look for the correct one at snapshots.debian website.

share|improve this answer
I get this error after installing and trying to compile a program. Can you help me with this? – Phani Nov 8 '14 at 4:11
@Phani not sure. Did you install all g++-3.4's dependencies? – Elazar Leibovich Nov 9 '14 at 9:24
How do I do that? I installed build-essential using apt-get. – Phani Nov 14 '14 at 23:09
Add the debian snapshot repository. You might want to check out a tutorial how to add repositories to debian. – Elazar Leibovich Nov 16 '14 at 9:37
What happened after you followed the steps in the answer? – Elazar Leibovich Nov 16 '14 at 9:37

gcc-3.3 is available in all current stable releases (In lucid, it is available in lucid-backports)

List of binaries available per release

You can see the above list with the following commands:

Source package list:

rmadison gcc-3.3

Source and binary list:

rmadison gcc-3.3 -S
share|improve this answer

For 4.2.3 I had to add

deb hardy-security main

to my /etc/apt/sources.list

Reference1, Reference2

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.