我有一个问题apt-get失败并显示错误消息“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)
这似乎与柏油就好像我遵循ubuntuforums.org 上的一篇文章中有说明并创建一个用户定义的柏油 /usr/local/sbin/tar
错误不再发生。
#!/bin/sh
exec /bin/tar --touch -"$@"
然而,这个解决方案让我提出了一个问题尝试运行 tar 时插入额外的破折号我更愿意只进行常规的焦油工作。
答案1
真正的问题是 bugLP #539814. 解决方案是升级你的内核或者使用一个修补过的 tar 程序。
否则,请使用下一个解决方法:将文件内容替换/usr/local/sbin/tar
为:
#!/bin/sh
TAR_OPTIONS="--touch $TAR_OPTIONS" /bin/tar "$@"