I have an issue where apt-get fails with the error message "Cannot utime":
tar: ./postinst: Cannot utime: Bad file descriptor
tar: ./preinst: Cannot utime: Bad file descriptor
tar: ./prerm: Cannot utime: Bad file descriptor
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/apache2-mpm-prefork_2.2.14-5ubuntu8.4_i386.deb (--unpack):
subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/apache2-mpm-prefork_2.2.14-5ubuntu8.4_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
This seem to be related to tar as if I follow the instructions in a post on ubuntuforums.org and create a user defined tar /usr/local/sbin/tar the error stops happening.
#!/bin/sh
exec /bin/tar --touch -"$@"
However that solution caused me to ask a question about Extra dash insertion when trying to run tar. I would much prefer to just have regular tar working.