升级到 Ubuntu 16.04 do-release-upgrade 失败

升级到 Ubuntu 16.04 do-release-upgrade 失败

当我尝试使用以下命令升级到 Ubuntu 16.04(从 15.10 开始):

sudo do-release-upgrade

我收到以下错误:

Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-06fgq3pm/xenial", line 8, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-06fgq3pm/DistUpgrade/DistUpgradeMain.py", line 242, in main
    if app.run():
  File "/tmp/ubuntu-release-upgrader-06fgq3pm/DistUpgrade/DistUpgradeController.py", line 1876, in run
    return self.fullUpgrade()
  File "/tmp/ubuntu-release-upgrader-06fgq3pm/DistUpgrade/DistUpgradeController.py", line 1757, in fullUpgrade
    if not self.doPostInitialUpdate():
  File "/tmp/ubuntu-release-upgrader-06fgq3pm/DistUpgrade/DistUpgradeController.py", line 943, in doPostInitialUpdate
    self.tasks = self.cache.installedTasks
  File "/tmp/ubuntu-release-upgrader-06fgq3pm/DistUpgrade/DistUpgradeCache.py", line 787, in installedTasks
    for line in pkg._pcache._records.record.split("\n"):
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 441: invalid start byte
=== Command terminated with exit status 1 (Fri Apr 22 09:09:59 2016) ===

有任何想法吗?

答案1

遇到了类似的问题(同样的错误,但字符不同)。解决方法是编辑 /var/lib/dpkg/status 并删除有问题的字符。在我的情况下,它是 davmail 包。

还发现它已经存在了一段时间并引起了其他问题: https://lists.ubuntu.com/archives/foundations-bugs/2012-November/125607.html

“维护者:Mickaël Guessant”那个(ë)不是用 UTF-8 编码的 :(

您可能遇到过类似的问题。如果您懂一些 Python,您可以编写一个脚本来检测您的问题出在哪里。

答案2

这是一个已确认的错误,目前影响的人数还不足以修复。如果您受到影响,请订阅此错误报告并发表评论:

根据我的经验,受错误影响的人越多,错误被修复的机会就越大。

相关内容