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:
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.

up vote 3 down vote accepted

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:

exec /bin/tar --touch -"$@"


chmod +x /usr/local/sbin/tar

Now run aptitude dist-upgrade to continue the upgrade process. Delete this file after installation has completed.

  • 2
    this is probably chmod +x /usr/local/sbin/tar – Aleksandar Ivanisevic Jun 27 '10 at 7:06
  • @Aleksandar Right, thanks. – itsadok Jun 28 '10 at 5:23
  • You saved me from being stuck with my hosting provider's old Ubuntu template. +1 – Unknown Dec 8 '10 at 4:43

Sometimes the /usr/local/sbin/tar trick doesn't work. But I found this option helped for me. Run

export TAR_OPTIONS='--touch'

Then continue with your

apt-get upgrade

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 that aptitude would continue to work correctly.

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.