将ubuntu 8.04升级到10.04时“无法使用utime:错误的文件描述符”

运行do-release-upgrade – 在我的Ubuntu Server 8.04上提出后,我收到了消息:
The upgrade is completed but there were errors during the upgrade process.

搜索升级输出,我发现了这个:

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:
 /var/cache/apt/archives/diff_1%3a2.8.1-18_all.deb
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).

实际上,这是一个known bug.更多细节是herehere.

我将发布我找到的解决方法作为答案.

作为解决方法,您可以为tar创建一个包装器,它将添加–touch选项:

在/usr/local / sbin下创建一个名为tar的文件,其中包含以下内容

#!/bin/sh
exec /bin/tar --touch -"$@"

做:

chmod +x /usr/local/sbin/tar

现在运行aptitude dist-upgrade以继续升级过程.安装完成后删除文件.

相关文章

1.安装过程出现0x00000000指令引用的0x00000000内存该内存不能为written 如果你安装的是inux系统 需要在...
写在全面:如果根据以下教程涉及到只读文件需要更改文件权限才能需修改文件内容,参考我的另一篇博客:...
写在前面:以下步骤中需要在终端输入命令,电脑端查看博客的朋友可以直接复制粘贴到终端,手机端查看的...
ubuntu16.04和18.04更换国内源 写在前面:安装好ubuntu双系统后,默认的软件更新源是国外的,在国内使用...
ubuntu双系统启动时卡死解决办法(在ubuntu16.04和18.04测试无误) 问题描述: 在安装完ubuntu双系统后...
又来造轮子了。。。。。。。。。。。。。。。。 今天使用w3af向文件中写入的时候,发现没有write权限,...