0

can you please help to resolve the issue?

W: Не удалось получить http://archive.ubuntu.com/ubuntu/dists/precise/restricted/binary-i386/Packages  404  Not Found [IP: 91.189.91.13 80]

W: Не удалось получить http://archive.ubuntu.com/ubuntu/dists/precise/universe/binary-i386/Packages  404  Not Found [IP: 91.189.91.13 80]

W: Не удалось получить http://archive.ubuntu.com/ubuntu/dists/precise/multiverse/binary-i386/Packages  404  Not Found [IP: 91.189.91.13 80]

E: Некоторые индексные файлы не скачались. Они были проигнорированы или вместо них были использованы старые версии.

With curl this URL works well:

curl -I http://archive.ubuntu.com/ubuntu/dists/precise/restricted/binary-i386/Packages.gz
HTTP/1.1 200 OK
Date: Tue, 07 Oct 2014 10:29:43 GMT
Server: Apache/2.2.22 (Ubuntu)
Last-Modified: Wed, 25 Apr 2012 22:42:47 GMT
ETag: "ae0aaa-2394-4be88971e07c0"
Accept-Ranges: bytes
spv82
  • 31
  • 7

1 Answers1

1

The HTTP error 404 makes it look like some common problems.
These are caused by repositories vanishing, or being moved away.

But it's not that our repository was no longer in place:

wget -q http://archive.ubuntu.com//ubuntu/dists/precise/ -O - | html2text
****** Index of /ubuntu/dists/precise ******
[[ICO]] Name              Last_modified     Size
============================================================================
[[DIR]] Parent_Directory                                                  -
[[   ]] Contents-amd64.gz 26-Apr-2012 05:30                              21M
[[   ]] Contents-i386.gz  26-Apr-2012 06:11                              21M
[[   ]] Release           25-Apr-2012 22:49                              48K
[[   ]] Release.gpg       25-Apr-2012 22:49                              198
[[DIR]] main/             05-Dec-2011 18:03                                -
[[DIR]] multiverse/       14-Oct-2011 00:29                                -
[[DIR]] restricted/       14-Oct-2011 00:29                                -
[[DIR]] universe/         14-Oct-2011 00:29                                -
============================================================================
     Apache/2.2.22 (Ubuntu) Server at archive.ubuntu.com Port 80

Looking closely, it tries to access Packages, not Packages.gz as usual.

That does not look really suspect; There are multiple formats available, like .bz2 too; uncompressed is just another encoding.

$ wget -q http://archive.ubuntu.com//ubuntu/dists/precise/restricted/binary-i386/ -O - | html2text
****** Index of /ubuntu/dists/precise/restricted/binary-i386 ******
[[ICO]] Name             Last_modified     Size
============================================================================
[[DIR]] Parent_Directory                                                  -
[[   ]] Packages.bz2     25-Apr-2012 22:42                              8.2K
[[   ]] Packages.gz      25-Apr-2012 22:42                              8.9K
[[   ]] Release          25-Apr-2012 22:49                               102
============================================================================
     Apache/2.2.22 (Ubuntu) Server at archive.ubuntu.com Port 80

Even after finding that Packages is indeed missing, it's not really a reason to suspect something is wrong: Common web servers have an option to transparently unzip files as needed - just what seems to happen here.


A while later I found a bugreport, according to which the filename without .gz is indeed plain wrong in this place;

But the cause is really unexpected: The because the directories are deeper nested than usual, the length of the URL hit some limit. It does not fit into some fixed length buffer. It is three bytes too long; So three characters get discarded; The URL does not have any URL parameter etc. So the path of the URL get's chopped off;

By three characters, removing the .gz. Leaving a perfectly valid filename.

Packages.gz not found because instead searching for Packages only

Volker Siegel
  • 13,065
  • 5
  • 49
  • 65