13

I'm trying to update a Ubuntu server and when I run apt-get update I get a number of errors like the examples below (note I added some space after http).

Err http  ://no.archive.ubuntu.com natty/main Sources  404  Not Found
Err http  ://no.archive.ubuntu.com natty/restricted Sources 404  Not Found

AND

W: Failed to fetch http  ://no.archive.ubuntu.com/ubuntu/dists/natty/main/source/Sources  404  Not Found
W: Failed to fetch http  ://no.archive.ubuntu.com/ubuntu/dists/natty/restricted/source/Sources  404  Not Found

I tried to replace all occurrences of http   ://no.archive.ubuntu.com/ with http  ://archive.ubuntu.com/

But seems all of these archives are gone...

Version of Ubuntu: lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 11.04 Release: 11.04 Codename: natty

How can I cleanup this mess? Thanx for any help! j

3
  • Thanx for the suggestion, but there is no etc/apt/apt.conf file. In /etc/apt I have the following: apt.conf.d preferences.d secring.gpg sources.list sources.list~ sources.list.d sources.list.distUpgrade trustdb.gpg trusted.gpg trusted.gpg~ trusted.gpg.d
    – jornk
    Sep 13, 2013 at 7:22
  • And in /etc/apt/apt.conf.d I have these files: 00CDMountPoint 00trustcdrom 01autoremove 05aptitude 20changelog 70debconf
    – jornk
    Sep 13, 2013 at 7:24
  • Forgot to say that the example URLs don't seem to exist (tested on different machines on different networks), so I doubt it can be an issue with proxy as suggested in the link.
    – jornk
    Sep 13, 2013 at 7:31

2 Answers 2

32

I assume the problem is because you are using a relatively old release of Ubuntu. A possible fix would be to open the /etc/apt/sources.list file with an editor of your choice .Change all (xx.)archive.ubuntu.com to old-releases.ubuntu.com.. In your case an example would be ://archive.ubuntu.com/ubuntu/dists/natty/main/source/Sources becomes

://old-releases.ubuntu.com/ubuntu/dists/natty/main/source/Sources

after this, you can try running sudo apt-get update

For you to update your release,you need update-manager-core(sudo apt-get install update-manager-core) and then sudo do-release-upgrade but this will update you to the next release and has to be repeated until you reach say 12.04 LTS which has Long Term Support.

1
  • 8
    Thank you! This solved the problem! I also had to change to old-releases for security.ubuntu.com
    – jornk
    Sep 13, 2013 at 7:40
3

Ubuntu 11.04 was supported for 18 months, and that means it's been unsupported for almost a year. If you have to use it, then you need to switch to old-releases archives, but please keep in mind that you will not get any security upgrades for it and there are known issues.

The correct way to "cleanup this mess" is to upgrade to a current version of Ubuntu. If you don't want to upgrade very often, the best suggestion is to get 12.04.3LTS, which will be supported until April 2017. You can upgrade LTS-releases directly from one to the next. You can't skip versions, so upgrading 11.04 would take a long time.

3
  • Thanx, yes this is what I'm about to endeavour on - get to 12.04
    – jornk
    Sep 13, 2013 at 7:41
  • Then you can either upgrade to 11.10 via old-releases, then switch back to supported repos and upgrade to 12.04... Or perform a clean install. I think I'd recommend the latter. :) Sep 13, 2013 at 9:37
  • I also had to remove the us. part.
    – Ari Porad
    Jan 27, 2015 at 3:06

Not the answer you're looking for? Browse other questions tagged .