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.

Recently I have installed an older version of Ubuntu on my old machine. When ever I am trying to install any software it is giving error

sudo -i apt-get install vlc

The error being flagged is under below.

Reading package lists... Done               
Building dependency tree       
Reading state information... Done    
E: Couldn't find package vlc
share|improve this question

7 Answers 7

up vote 172 down vote accepted

The repositories for older releases that are not supported (like 11.04, 11.10 and 13.04) get moved to an archive server. There are repositories available at http://old-releases.ubuntu.com

The reason for this is that it is now out of support and no longer receiving updates and security patches.

I would urge you to consider a supported distribution. If your computer is too old in terms of memory or processor then you should consider a distribution such as Lubuntu or Xubuntu.

If you want to continue using an outdated release then edit /etc/apt/sources.list and change archive.ubuntu.com to old-releases.ubuntu.com

You can do this with sed

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

Sometimes, it might be faster to create backups of your system and reinstall using supported release instead.

source

See also:

share|improve this answer
13  
sed usage is just pro. –  Bruno Pereira Jan 15 '13 at 10:10
12  
Worth noting, I had to use us.archive.ubuntu.com in my sed command. Hope this saves someone else the head-scratching –  Matthew Boynes Mar 6 '13 at 23:30
3  
and, just for the sake of completeness... what about extras repository (for Skype etc)? Are they available anywhere after EOF? –  MestreLion Apr 27 '13 at 1:00
    
an easier way is sudo vi /etc/apt/sources.list and modify it manually. I had to do it because I'm quite new and I don't know sed to make this work for karmic, Thanks, Your answer is still valid and correct. –  JaDogg Dec 3 '13 at 19:08
7  
An even easier way is sudo nano /etc/apt/sources.list, as vi* is just annoying... –  Wilf Mar 1 at 18:35

What are 404 errors

The 404 or Not Found error message is a HTTP standard response code indicating that the client was able to communicate with the server, but the server could not find what was requested.

The web site hosting server will typically generate "404 - Page Not Found" web page, when users attempts to follow a broken or dead link.

Why are we facing 404 errors

Ubuntu follows the approach of two different release cycles:

Normal Ubuntu releases are supported for 9 months. LTS releases are supported for 5 years.

Past releases may have different support schedules (for example, normal releases (before 13.04) used to be supported for 18 months, while LTS releases (before 12.04) used to be supported for 3 years on the desktop and 5 years on the server).

EOL: Once the support period for a particular release is over; they are called End Of Life (EOL) and all the updates and package repositories for that Release are transferred to a different server which results in 404 errors while running sudo apt-get update. You can confirm if your release has become EOL by going to this page. If your Ubuntu release is mentioned under "End Of Life (EOL)" Table, then the release is no longer supported and you should try to upgrade to a newer supported release. However, if you wish to continue using this unsupported release, you would have to make necessary modifications in /etc/apt/sources.list to point to the old-releases server of Ubuntu.

Steps to make necessary modifications

  1. Open your Terminal:

    • Press Ctrl + Alt + T; OR
    • If you have Gnome: ApplicationsAccessoriesTerminal; OR
    • If you have Unity: press Super (the key between Left Ctrl and Left Alt) and query for Terminal.
  2. Run the following command:

    gksudo gedit /etc/apt/sources.list
    

    input your user password and press Enter.

  3. Find the first line which doesn't start with #. Suppose you are running Karmic Koala (Ubuntu 9.10): it should be like the following line:

    deb <siteurl> karmic main restricted
    

    where, <siteurl> is your preferred server - http://gb.archive.ubuntu.com/ubuntu in your case (for example).

  4. Press Ctrl + H to replace your <siteurl> with http://old-releases.ubuntu.com/ubuntu.

    • Search for: http://gb.archive.ubuntu.com/ubuntu ie; <siteurl>
    • Replace with: http://old-releases.ubuntu.com/ubuntu and
    • Press Replace All
  5. Once again:

    • Search for: http://security.ubuntu.com/ubuntu (this exact url for all the Ubuntu Releases — whatever be the present server that you are using)
    • Replace with: http://old-releases.ubuntu.com/ubuntu
    • Press Replace All
  6. Save your file and exit Gedit.

  7. Run the following command:

    sudo apt-get update
    

There you go. No 404 Errors this time. You can now install all the available packages for your Ubuntu Release. You can also run sudo apt-get dist-upgrade to install any Security/Bug-fix updates which have not yet been installed but you won't get any further Security/Bug-fix updates from Ubuntu.

share|improve this answer
4  
+1 for also including instructions to update the security repo. –  Gaffi Mar 16 '13 at 16:07

The short answer is to add the next apt repository to the Third-Party Software (or Other Software in newer versions) in Software Sources (or Software & Updates in newer versions):

deb http://old-releases.ubuntu.com/ubuntu code_name main restricted universe multiverse

The long answer...

GUI Method

Well, actually we will do this without to use any terminal. Not even once. Just GUI, I promise ;-)

First, open Software Sources (or Software & Updates in newer versions). It does not matter how old is your Ubuntu, there is certainly something like this. For Ubuntu 9.04 (Jaunty Jackalope) look at next image to see where is located:

Open Software Sources

After Software Sources (or Software & Updates) it is open, go in Ubuntu Software and Updates tabs and unselect everytiyng like in next pictures. You don't need this things anymore since your Ubuntu version is End of Life:

Ubuntu Software tab


enter image description here

Without closing Software Sources (or Software & Updates), go in Third-Party Software (for newest releases this tab is named Other Software) tab and add a new apt repository. Insert exactly next line when you are asked:

deb http://old-releases.ubuntu.com/ubuntu jaunty main restricted universe multiverse

If your version of Ubuntu is other than 9.04, replace in the above line jaunty with your Ubuntu codename (for example if you have Ubuntu 9.10, replace with karmic and so on):

Third-Party Software tab

Now, when you will close Software Sources (or Software & Updates) you will be asked to reload the information about available software. Just be sure that you have a working internet connection:

Reload available software


Downloading available software

And now you are free to download almost whatever you want. For 9.04 you can use Synaptic Package Manager. For newest releases there is Ubuntu Software Center.

For example to install VLC in Ubuntu 9.04 using Synaptic Package Manager, follow the instructions in the following pictures:

Open Synaptic Package Manager


Search VLC in SPM


Mark VLC


Mark aditional VLC


Apply VLC


Download VLC


Open VLC

If you want to Update your Ubuntu to a new release, just go to System > Update Manager:

Update Manager


Upgrade

I tested this method from a live session of Ubuntu 9.04 (Jaunty Jackalope) and as you can see from these pictures it worked. If you are on an installed session of Ubuntu you will be asked sometimes for root or admin password. Just insert your personal user password when you are asked.

share|improve this answer
    
I just did all this from installed 10.10 (maverick) version. Everything well good as described. @Radu, your answer is flawless! –  Gediminas Jeremiah Gudelis Aug 28 '13 at 20:01
    
Those images needs updating... wait... what are you doing with a pre-12.04? –  Braiam Dec 30 '13 at 14:01
    
@Braiam Those images are up to date. If you will give a try to Ubuntu 9.04 (Jaunty Jackalope), you will understand. –  Radu Rădeanu Mar 22 at 19:49
    
@RaduRădeanu Ubuntu 9.04 was my first foray into the linux world. Ahh, those screenshots bring back memories! –  Tyzoid Apr 13 at 22:03

To get apt-get working again, change your software sources to the old release repositories.

gksudo gedit /etc/apt/sources.list

delete whatever is in there, and paste the following:

# Required
deb http://old-releases.ubuntu.com/ubuntu/ karmic main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ karmic-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ karmic-security main restricted universe multiverse

# Optional
#deb http://old-releases.ubuntu.com/ubuntu/ karmic-backports main restricted universe multiverse

That's all.

share|improve this answer
    
Thanks mikewhatever, but the result is the same when I try "apt-get install lm-sensors". Maybe there's another missing source: "Reading package lists... Done Building dependency tree Reading state information... Done Package lm-sensors is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package lm-sensors has no installation candidate" –  Rorro Apr 13 '12 at 10:55
    
Here are the debs: old-releases.ubuntu.com/ubuntu/pool/main/l/lm-sensors-3. I trust it, you've reloaded the sources list, right? –  mikewhatever Apr 13 '12 at 12:08
    
This answer does not work... Why does it have so many upvotes? Did anybody actually test it? –  Tomáš Zato Aug 15 at 11:00
    
I've tested it, but the real question is: Why are you still on Karmic? It's been out of support for years, and you should really move on to a more recent release. –  mikewhatever Aug 15 at 12:13

It appears the Karmic repositories are no longer available.

Since they are for a previous version of Ubuntu, you might consider removing them from your sources list. Take a look at this help page for step-by-step.

share|improve this answer

While fossfreedom's answer does a good job of describing and solving the problem, I've found a variant solution that I think is easier and a little more elegant.

The trick is to add http://old-releases.ubuntu.com/ubuntu/ as a mirror, and then tell Software Sources to switch to that mirror.

To do this, backup and edit /usr/share/python-apt/templates/Ubuntu.mirrors. Choose a fake location for the old-releases server (e.g. #LOC:US), and add the following line under it:

#LOC:US
http://old-releases.ubuntu.com/ubuntu/

Now open the system's Software Sources dialog, and manually select old-releases.ubuntu.com as though it were your regional mirror. You should find it listed under the fake location you chose in the previous step.

The next time you reload your package information via Synaptic or Update Manager, you should see it successfully retrieving updated package information.

share|improve this answer
    
Works fine, very easy & quick –  doug Jul 22 at 1:42

You can find the repositories under the "old-releases" server http://old-releases.ubuntu.com/ubuntu/dists/

And about how to edit the /etc/apt/sources.list https://help.ubuntu.com/community/EOLUpgrades

share|improve this answer
    
Thanks gajdipajti, I'm looking for it inside the package list, but cannot find the correct ".deb". My ubuntu already has "libsensors3", but all the packages ask me for the "libsensors4". I know the normal solution should be upgrade, but I cannot do it because the computer is dedicated to be used with a software that only runs on 9.10. –  Rorro Apr 13 '12 at 10:34
    
@Rorro: Which software only runs on Ubuntu 9.10? –  unforgettableid Oct 9 '13 at 1:45

protected by Community Aug 28 at 9:43

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.