1

I tried to install gcc compiler because I want to learn programming I have an old computer 1gb ram so I installed an older version of Ubuntu (10.04) and its working faster than before but when I try to install gcc package by writing

sudo apt-get install gcc 

but the following text appear :

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package gcc

so I said maybe the problem is that my version of ubuntu is too old so I wrote in the terminal

sudo get-apt upgrade 

but this also appear to me

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

and I tried also

sudo apt-get update 

but many lines appear and the last one was

E: Some index files failed to download, they have been ignored, or old ones used   instead 

and I noticed also that this version of Ubuntu don't have a graphical package manager so .

user297904
  • 131
  • 3
  • 3
  • 9

3 Answers3

1

Desktop version of 10.04 end the life so you can't install gcc using apt-get...

You should upgrade to latest version of Ubuntu.

To upgrade latest you can do with sed, first open terminal(Ctrl+Alt+T) and type the following,

sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list

then update with

sudo apt-get update && sudo apt-get dist-upgrade
Kaz Wolfe
  • 34,122
  • 21
  • 114
  • 172
A J
  • 11,367
  • 17
  • 44
  • 59
  • Ok but how to upgraded i nedd to reinstall it or just with terminal – user297904 Aug 28 '14 at 10:36
  • Upgrading from 10.04 to 14.04 will take several steps. First you need to upgrade to 12.04 LTS and from there to 14.04 LTS. It may be easier/faster if you install 14.04 from scratch, but that depends on how much customisation you have done so far. Or, you could just upgrade to 12.04 as that will be supported for a few more years. – ph0t0nix Aug 28 '14 at 10:39
  • @user297904 I have updated answer please try it... – A J Aug 28 '14 at 10:41
  • Ok i read the update and it works thanks a lot :D – user297904 Aug 28 '14 at 10:55
  • @Whaaaaaat thank u for suggestion, I will consider in future... – A J Oct 23 '14 at 06:56
0

I would definitely not recommend installing older Ubuntu versions, given that there will be no security updates for them, leaving your system vulnerable for all kinds of attacks. Instead, it would be better to go for a lighter desktop edition, for example LUbuntu (or are you already using that give nthat this post is tagged with lubuntu).

As to the missing gcc and the failing index files: maybe the Ubuntu mirror that you selected during installation no longer contains the files for older releases like Ubuntu 10.04. You can check the mirror that you are using in the file /etc/apt/sources.list. For example mine shows several references to the Dutch mirror: http://nl.archive.ubuntu.com.

ph0t0nix
  • 1,377
0

Which version of gcc do you want to install? All gcc release are in here just download what version of gcc if you want from there and then install by your self. If you don't know how to install that, follow this question is answered here.

αғsнιη
  • 35,660