Package manager fails to update ("failed to fetch")

Asked by Yani Raafezaj

I'm having somewhat the same problem; it just idles for a while, then fails with this message:

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/natty/InRelease
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/natty-updates/InRelease
W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/InRelease
W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/InRelease

When I run it in the terminal I get this:

0% [Connecting to us.archive.ubuntu.com (91.189.88.30)] [Connecting to archive.canonical.com (91.189.88.33)] [Connecting to extras.ubuntu.com (91.189.88.33)]

after which it hangs. I've tried editing my sources.list file and there aren't any duplicate lines in there.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu update-manager Edit question
Assignee:
No assignee Edit question
Solved by:
Yani Raafezaj
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Try changing server in software centre. The US server may be being worked on.

Revision history for this message
Yani Raafezaj (ytraaf) said :
#2

I tried that twice, plus I've had the problem for seventeen days now.

Revision history for this message
Yani Raafezaj (ytraaf) said :
#3

There's a proxy server, but I didn't change any of the settings between when it was working and when it started failing. As far as I know the company didn't change the server settings either, since none of my coworkers are having the problem.

Revision history for this message
Sam_ (and-sam) said :
#4

Create a clean sources.list without 'lnRelease' and switch to main server.
https://help.ubuntu.com/community/Repositories/Ubuntu#Download%20Server
e.g.
http://paste.ubuntu.com/650898/

'lnRelease' doesn't exist anymore since the release is in the past.
404 error indicates that the requested resource may be available again in the future
https://secure.wikimedia.org/wikipedia/en/wiki/HTTP_404
Test.
http://archive.ubuntu.com/ubuntu/dists/natty/InRelease

Revision history for this message
Yani Raafezaj (ytraaf) said :
#5

Okay, I'll try this when I get back to work on Monday.

Revision history for this message
Yani Raafezaj (ytraaf) said :
#6

I completely replaced my sources.list without lnRelease, but it still seems to be using it:

Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty/InRelease
Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty-updates/InRelease
Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/InRelease
Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty-security/InRelease
Some index files failed to download. They have been ignored, or old ones used instead.

And yes, I tried the main server and the US server as well.

Revision history for this message
Sam_ (and-sam) said :
#7

Please pastebin sources.list and also have a look in /etc/apt/sources.list.d.

Revision history for this message
Manfred Hampl (m-hampl) said :
#8

There recently were two questions of people who have problems because their router or ISP interfere in handling of "404 file not found" messages

To check if that is also the case here, can you please open your web browser and try to access
http://archive.ubuntu.com/ubuntu/dists/natty/InRelease
What do you see?

And please open a terminal and execute the following commands

lsb_release -a
sudo apt-get update
sudo apt-get upgrade

and then copy ALL output and paste it into a new message of this thread.

Revision history for this message
Yani Raafezaj (ytraaf) said :
#9

Sam: The directory is completely empty according to ls -lAh. I did a diff with your pastebin and my sources.list, and they're exactly the same.
Manfred - I get a 404 with the link you sent me, and this is the output:

root@dargueta-Precision-WorkStation-T3400:/etc/apt# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.04
Release: 11.04
Codename: natty
root@dargueta-Precision-WorkStation-T3400:/etc/apt# apt-get update
Err http://extras.ubuntu.com natty InRelease

Err http://extras.ubuntu.com natty Release.gpg
  Unable to connect to extras.ubuntu.com:http:
0% [Connecting to archive.ubuntu.com (91.189.88.46)]

It also tried 91.189.92.169 - .171, and 91.189.88.30 - .31 for archive.ubuntu.com. (I wasn't watching it the entire time, so it might've tried a few others.) I left it there for over ten minutes and that's as far as it got, so I killed it after that.

Revision history for this message
Yani Raafezaj (ytraaf) said :
#10

Okay, it's fixed. Apparently one of the updates deleted /etc/apt/apt.conf which had a few company-specific settings in there.

Revision history for this message
Sam_ (and-sam) said :
#11