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

前端之家收集整理的这篇文章主要介绍了将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以继续升级过程.安装完成后删除文件.

原文链接:https://www.f2er.com/ubuntu/347611.html

猜你在找的Ubuntu相关文章