After running do-release-upgrade --proposed
on my Ubuntu Server 8.04, I got the message:
The upgrade is completed but there were errors during the upgrade process.
Searching up the upgrade output, I found this:
Setting up tar (1.22-2) ...
tar: ./md5sums: Cannot utime: Bad file descriptor
tar: ./control: Cannot utime: Bad file descriptor
tar: .: Cannot utime: Bad file descriptor
tar: Exiting with failure status due to previous errors
dpkg-deb: subprocess tar returned error exit status 2
dpkg: error processing /var/cache/apt/archives/diff_1%3a2.8.1-18_all.deb (--unpack):
subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/diff_1%3a2.8.1-18_all.deb
Exception during pm.DoInstall(): E:Sub-process /usr/bin/dpkg returned an error code (1)
Could not install the upgrades
The upgrade is now aborted. Your system could be in an unusable
state. A recovery will run now (dpkg --configure -a).
Apparenly, this is a known bug. More details are here and here.
I will post the workaround I found as an answer.
As a workaround, you can create a wrapper for
tar
that will add the--touch
option:create a file named
tar
under/usr/local/sbin
with the following content:Do:
Now run
aptitude dist-upgrade
to continue the upgrade process. Delete this file after installation has completed.Sometimes the /usr/local/sbin/tar trick doesn't work. But I found this option helped for me. Run
Then continue with your
I got this same error, and I couldn't install anything with
aptitude
either because of tar being broken. I had to leave/usr/local/sbin/tar
so thataptitude
would continue to work correctly.