我有一个问题,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)
这似乎与tar有关,就好像我按照ubuntuforums.org 上的帖子中的说明创建用户定义的tar /usr/local/sbin/tar
错误停止发生。
#!/bin/sh
exec /bin/tar --touch -"$@"
但是,该解决方案使我在尝试运行 tar 时询问有关 Extra dash 插入的问题,我更愿意只让常规 tar 工作。
真正的问题是错误LP #539814。解决方案是升级内核或使用打补丁的 tar 程序。
否则,使用下一个解决方法:将
/usr/local/sbin/tar
文件内容替换为: