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

I am running Ubuntu 8.04 (currently I do not have the option to upgrade due to hardware problems). I need to get g++ onto my installation but as this is no longer supported I am unable to use the traditional apt-get approach. What are my options? Are ubuntu packages configured specifically for each version? For example could I manually download a later version of gcc and g++ that do not originally ship with 8.04 (say the 10.04 version for example) and build them from scratch? Do the compilers work in this way in the sense that they have a version PER ubuntu version or are they maintained as separate entities??

I do not know enough about ubuntu internals really and always use apt-get to obtain/update any packages I need. If it is possible to do it this way is there a way to be certain that I have everything I need with regards to utility packages needed by g++ for the installation??

share|improve this question
What happens when you try sudo apt-get instal g++? – Linuxios Jun 30 '12 at 14:01
I have actually only tried to sudo apt-get install build-essential but when I do it i get E: Couldn't find package build-essential . It has trouble accessing the sites contained in my /etc/apt/sources.list file (I think that is what the file is called) – mathematician1975 Jun 30 '12 at 14:04
What's in /etc/apt/sources.list? The default? Changed sources? ANd please tell me what happens when you issue apt-get install g++. – Linuxios Jun 30 '12 at 14:05
Unfortunately I cant do it right now as I am not currently at work (it is a work problem) I have performed a raw install and have not modified anything at all in the sources.list file. From memory, the the apt-get install g++ complained about a dependency conflict with the gcc (version 4.2.2) I think – mathematician1975 Jun 30 '12 at 14:09
Hm. If you'll comment after you try. Why can't you upgrade? Ubuntu isen't like Windows. Old versions die fast, rather than being supported for 10 years. You need to upgrade to the newest LTS version, 12.04. – Linuxios Jun 30 '12 at 14:13
up vote 2 down vote accepted

You need an Ubuntu repository that has the hardy packages.

To do so, click on System->Administration->Software sources and select a different mirror.

For example, at you can see that hardy is still listed. Therefore, change to this South African mirror.

share|improve this answer
Thankyou for this suggestion. I will try this first thing monday morning. – mathematician1975 Jun 30 '12 at 14:21
Many many many thanks for this. This has solved all of my upgrade to 10.04 issues. I have spent weeks on this - thankyou so much!! – mathematician1975 Jul 3 '12 at 8:24

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.