Error "package $FOO failed to install/upgrade: cannot access archive: No such file or directory"

Bug #523395 reported by Daniel Hahler
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Confirmed
Undecided
Unassigned
python2.6 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: python2.6

IIRC apt-cacher-ng failed to download archives properly and then trying to install them (via aptitude safe-upgrade) caused this failure.

Similar bug reports: https://bugs.launchpad.net/ubuntu/+bugs?field.searchtext=%22cannot+access+archive%22

ProblemType: Package
Architecture: i386
Date: Tue Feb 16 20:36:29 2010
DistroRelease: Ubuntu 10.04
ErrorMessage: Kann auf das Archiv nicht zugreifen: No such file or directory
NonfreeKernelModules: nvidia
Package: python2.6-dev 2.6.4-6ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-13.18-generic
SourcePackage: python2.6
Title: package python2.6-dev 2.6.4-6ubuntu1 failed to install/upgrade: Kann auf das Archiv nicht zugreifen: No such file or directory
Uname: Linux 2.6.32-13-generic i686

Revision history for this message
Daniel Hahler (blueyed) wrote :
Revision history for this message
Adam Collard (adam-collard) wrote :

I noticed that some of the sentences in this bug report are not in English. If they were translated to English they would be accessible to more triagers. Could you please translate them?

Changed in python2.6 (Ubuntu):
status: New → Incomplete
Revision history for this message
Daniel Hahler (blueyed) wrote :

The error is from dpkg and says "cannot access archive".

IIRC this was caused by apt-cacher-ng failing to download the files properly.

There are a lot of similar bugs, and we should look into this:
1. Is it causes by apt-cacher-ng or similar programs in the other cases, too
2. Apport should ignore those errors (as far as I can see)

Changed in python2.6 (Ubuntu):
status: Incomplete → Triaged
status: Triaged → Invalid
summary: - package python2.6-dev 2.6.4-6ubuntu1 failed to install/upgrade: Kann auf
- das Archiv nicht zugreifen: No such file or directory
+ Error "package $FOO failed to install/upgrade: cannot access archive: No
+ such file or directory"
description: updated
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Hi, Daniel

I've been tracking this error for some time and I still haven't found the cause of the failure.
Due to the number of duplicates I don't think that apt-cacher-ng is the only reason of this problem.
Up to now, I haven't dig enough into that particular problem to find a pattern and how to reproduce it but I'm suspecting some crash issue on filesystem with delayed allocation (but in this case the archive is 0 bytes and downloaded again when the user try to perform the next install/upgrade)
I've set up a wiki page at https://wiki.ubuntu.com/JeanBaptisteLallement/CannotAccessArchive to be used as a white-board to track this issue and open discussion. Feel free to edit it.

Revision history for this message
Daniel Hahler (blueyed) wrote :

I've just had it again, but slightly different:

Downloaded fine:
Hole:92 http://de.archive.ubuntu.com lucid/main yelp 2.29.5-0ubuntu2 [372kB]
Hole:93 http://de.archive.ubuntu.com lucid/universe gnome-pilot 2.0.17-0ubuntu4 [223kB]
168MB wurden in 2Min 0s heruntergeladen (1.396kB/s)
Lese Changelogs... Fertig
apt-listchanges: Wollen Sie fortsetzen? [J/n]
apt-listchanges: Sende E-Mail an root: apt-listchanges: Changelogs für base

Then failed to install, all the files were not there at all:
E: Datei /var/cache/apt/archives/gnome-orca_2.29.91-0ubuntu2_all.deb konnte nicht geöffnet werden - open (2: No such file or directory)
E: Unable to determine the file size - fstat (9: Bad file descriptor)
E: Lesefehler - read (9: Bad file descriptor)
E: Prior errors apply to /var/cache/apt/archives/gnome-orca_2.29.91-0ubuntu2_all.deb

Maybe it's a maintenance task which purges the files, while I was reading the changelog via apt-listchanges (only some minutes, but after resuming from hibernation, for ~12 hours), like /etc/cron.daily/apt ?

Changed in apport (Ubuntu):
status: New → Confirmed
Revision history for this message
lima (lima25) wrote :

I've had this problem today, I was applying a patch to postfix, based on the following:
https://www.howtoforge.com/virtual-users-and-domains-with-postfix-courier-mysql-and-squirrelmail-ubuntu-14.04-lts#-apply-the-quota-patch-to-postfix

After that, dpkg complained about "cannot access archive: No such file or directory". The deb archive was postfix_2.11.0-1ubuntu1_amd64.deb.

I've run the dpkg through strace, and I found the following:
stat("postfix_2.11.0-1_amd64.deb", 0x7ffcaa79c310) = -1 ENOENT (No such file or directory)

So, I've renamed the file postfix_2.11.0-1ubuntu1_amd64.deb to postfix_2.11.0-1_amd64.deb, and it successfully installed.

I have no idea what is causing this, but this was a "solution".

The strangest thing is that now even the first archive is installing correctly. (dpkg -i postfix_2.11.0-1ubuntu1_amd64.deb).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.