从 Ubuntu 20.04 升级到 20.10 时出错

从 Ubuntu 20.04 升级到 20.10 时出错

do-release-upgrade 会抛出此错误

Original exception was:
Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-1piubui5/groovy", line 8, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-1piubui5/DistUpgrade/DistUpgradeMain.py", line 238, in main
    if app.run():
  File "/tmp/ubuntu-release-upgrader-1piubui5/DistUpgrade/DistUpgradeController.py", line 2089, in run
    return self.fullUpgrade()
  File "/tmp/ubuntu-release-upgrader-1piubui5/DistUpgrade/DistUpgradeController.py", line 1932, in fullUpgrade
    if not self.updateSourcesList():
  File "/tmp/ubuntu-release-upgrader-1piubui5/DistUpgrade/DistUpgradeController.py", line 801, in updateSourcesList
    self.sources = SourcesList(matcherPath=self.datadir)
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 273, in __init__
    self.matcher = SourceEntryMatcher(matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 470, in __init__
    dist = DistInfo(base_dir=matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/distinfo.py", line 184, in __init__
    with open(dist_fname) as dist_file:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/ubuntu-release-upgrader-1piubui5/Pop.info'

答案1

我也遇到了这个问题,但是就我而言,它正在寻找Ubuntu.info

我的解决方案不是一个解决方案,而是一个变通方法:在 do-release-upgrade检查现有存储库时暂停它(只需在终端中按Crlt+即可),查找最新目录并在那里创建一个空的信息文件(,或类似内容)。最后,您可以使用 取消暂停 release-upgrade 过程。Z/tmpubuntu-release-upgrader-*touch /tmp/ubuntu-release-upgrader-*/Pop.infofg

答案2

您需要在执行 dist-upgrade 之前从 apt 配置中删除额外的 repos,然后在升级后添加它们,但前提是检查它们仍然兼容。如果您不这样做,您的升级可能会在中途中断。

列出配置中启用的存储库

apt-add-repository -L

删除一个

apt-add-repository -r 'https://repository.url/ubuntu'

答案3

请注意/tmp/ubuntu-release-upgrader-*krisek 评论中的星号。可能有多个这样的文件夹需要添加Pop.info或。ubuntu.info

相关内容