Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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.

share|improve this answer
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
share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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