do-release-upgrade(19.10)python 错误

do-release-upgrade(19.10)python 错误

我使用的是 Ubuntu 19.10,并且已更新该版本。我想升级到 20.04。作为 Root,我输入了以下命令 - “do-release-upgrade -d”,但收到多个 Python 错误,并且升级过程失败。命令输出错误如下。有什么建议吗?

已获取 0 B,耗时 0 秒(0 B/秒)
正在读取软件包列表... 完成 正在
构建依赖关系树
正在读取状态信息... 完成

回溯(最近一次调用最后一次):文件“/tmp/ubuntu-release-upgrader-4t_e6y6y/DistUpgrade/DistUpgradeQuirks.py”,第 186 行,位于 _get_from_and_to_version di.version('%s' % self.controller.fromDist).split()[0] AttributeError: 'UbuntuDistroInfo' 对象没有属性 'version'

在处理上述异常的过程中,又发生了另一个异常:

回溯(最近一次调用最后一次):文件“/tmp/ubuntu-release-upgrader-4t_e6y6y/focal”,第 8 行,在 sys.exit(main())文件“/tmp/ubuntu-release-upgrader-4t_e6y6y/DistUpgrade/DistUpgradeMain.py”,第 238 行,在 main 中,如果 app.run():文件“/tmp/ubuntu-release-upgrader-4t_e6y6y/DistUpgrade/DistUpgradeController.py”,第 2082 行,在运行中返回 self.fullUpgrade()文件“/tmp/ubuntu-release-upgrader-4t_e6y6y/DistUpgrade/DistUpgradeController.py”,第 1919 行,在 fullUpgrade 中如果不是 self.doPostInitialUpdate():文件“/tmp/ubuntu-release-upgrader-4t_e6y6y/DistUpgrade/DistUpgradeController.py”, 第 925 行, 在 doPostInitialUpdate self.quirks.run(“PostInitialUpdate”) 文件“/tmp/ubuntu-release-upgrader-4t_e6y6y/DistUpgrade/DistUpgradeQuirks.py”, 第 97 行, 在 run func() 文件“/tmp/ubuntu-release-upgrader-4t_e6y6y/DistUpgrade/DistUpgradeQuirks.py”, 第 116 行, 在 focalPostInitialUpdate self._get_from_and_to_version() 文件“/tmp/ubuntu-release-upgrader-4t_e6y6y/DistUpgrade/DistUpgradeQuirks.py”, 第 192 行, 在 _get_from_and_to_version (r.version for r in di.get_all("object") AttributeError:'UbuntuDistroInfo'对象没有属性'get_all' sys.excepthook 中的错误:回溯(最近一次调用最后一次):文件“/usr/lib/python3/dist-packages/problem_report.py”,第 477 行,在 add_to_existing self.write(f) 文件“/usr/lib/python3/dist-packages/problem_report.py”,第 430 行,在写入块 = f.read(1048576) 文件“/usr/lib/python3.7/codecs.py”,第 322 行,在解码(结果,消耗)= self._buffer_decode(data, self.errors, final) UnicodeDecodeError:'utf-8'编解码器无法解码位置 1 中的字节 0x8b:无效的起始字节

原始异常是:回溯(最近一次调用最后一次):文件“/tmp/ubuntu-release-upgrader-4t_e6y6y/DistUpgrade/DistUpgradeQuirks.py”,第 186 行,在 _get_from_and_to_version di.version('%s' % self.controller.fromDist).split()[0] AttributeError:'UbuntuDistroInfo'对象没有属性'version'

在处理上述异常的过程中,又发生了另一个异常:

回溯(最近一次调用最后一次):文件“/tmp/ubuntu-release-upgrader-4t_e6y6y/focal”,第 8 行,在 sys.exit(main())文件“/tmp/ubuntu-release-upgrader-4t_e6y6y/DistUpgrade/DistUpgradeMain.py”,第 238 行,在 main 中,如果 app.run():文件“/tmp/ubuntu-release-upgrader-4t_e6y6y/DistUpgrade/DistUpgradeController.py”,第 2082 行,在运行中返回 self.fullUpgrade()文件“/tmp/ubuntu-release-upgrader-4t_e6y6y/DistUpgrade/DistUpgradeController.py”,第 1919 行,在 fullUpgrade 中如果不是 self.doPostInitialUpdate():文件“/tmp/ubuntu-release-upgrader-4t_e6y6y/DistUpgrade/DistUpgradeController.py”, 第 925 行, 在 doPostInitialUpdate self.quirks.run(“PostInitialUpdate”) 文件“/tmp/ubuntu-release-upgrader-4t_e6y6y/DistUpgrade/DistUpgradeQuirks.py”, 第 97 行, 在 run func() 文件“/tmp/ubuntu-release-upgrader-4t_e6y6y/DistUpgrade/DistUpgradeQuirks.py”, 第 116 行, 在 focalPostInitialUpdate self._get_from_and_to_version() 文件“/tmp/ubuntu-release-upgrader-4t_e6y6y/DistUpgrade/DistUpgradeQuirks.py”, 第 192 行, 在 _get_from_and_to_version (r.version for r in di.get_all("object") AttributeError: 'UbuntuDistroInfo' 对象没有属性 'get_all'

答案1

为了实现这种情况,您可能有一个 pip 安装的 distro-info,但它不提供与 Ubuntu 包 python-distro-info 相同的信息。

相关内容