Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

4 Answers 4

up vote 5 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: http://packages.ubuntu.com

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

deb     http://archive.ubuntu.com/ubuntu/ hardy universe
deb-src http://archive.ubuntu.com/ubuntu/ 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     http://snapshot.debian.org/archive/debian/20070730T000000Z/ lenny main
deb-src http://snapshot.debian.org/archive/debian/20070730T000000Z/ lenny main
deb     http://snapshot.debian.org/archive/debian-security/20070730T000000Z/ lenny/updates main
deb-src http://snapshot.debian.org/archive/debian-security/20070730T000000Z/ 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

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 http://security.ubuntu.com/ubuntu 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.