将 Ubuntu 14.04 升级到 16.04 仍然失败

将 Ubuntu 14.04 升级到 16.04 仍然失败

我尝试将 Ubuntu 14.04 升级到 16.04,但遇到了一个问题。

我尝试遵循这篇文章:

https://www.digitalocean.com/community/tutorials/how-to-upgrade-to-ubuntu-16-04-lts

运行此命令后:

sudo do-release-upgrade

当出现 1022 ssh 对话框时,我错误地输入了n,然后就断开了连接。

后来,我不得不转到 Dashboard 终端,并恢复 ssh 连接。

但是当我重试该命令时:

sudo do-release-upgrade

它给了我这个消息,我不得不关闭终端:

Please report this as a bug and include the files
/var/log/dist-upgrade/main.log and /var/log/dist-upgrade/apt.log in
your report. The upgrade has aborted.
Your original sources.list was saved in
/etc/apt/sources.list.distUpgrade.

Traceback (most recent call last):

File "/tmp/ubuntu-release-upgrader-vgm0wvbx/xenial", line 8, in
<module>
sys.exit(main())

File
"/tmp/ubuntu-release-upgrader-vgm0wvbx/DistUpgrade/DistUpgradeMain.py",
line 242, in main
if app.run():

File
"/tmp/ubuntu-release-upgrader-vgm0wvbx/DistUpgrade/DistUpgradeController.py",
line 1907, in run
return self.fullUpgrade()

File
"/tmp/ubuntu-release-upgrader-vgm0wvbx/DistUpgrade/DistUpgradeController.py",
line 1725, in fullUpgrade
if not self.prepare():

File
"/tmp/ubuntu-release-upgrader-vgm0wvbx/DistUpgrade/DistUpgradeController.py",
line 438, in prepare
self._sshMagic()

File
"/tmp/ubuntu-release-upgrader-vgm0wvbx/DistUpgrade/DistUpgradeController.py",
line 328, in _sshMagic
self._view.information(summary, descr)

File
"/tmp/ubuntu-release-upgrader-vgm0wvbx/DistUpgrade/DistUpgradeViewText.py",
line 176, in information
readline()

File
"/tmp/ubuntu-release-upgrader-vgm0wvbx/DistUpgrade/DistUpgradeViewText.py",
line 50, in readline
s = input()

KeyboardInterrupt
=== Command terminated with exit status 1 (Tue Feb  4 01:29:35 2020) ===

已经重试几次,但仍然失败,有什么线索吗?

答案1

我最终通过从快照恢复 VPS droplet 重新启动了升级过程,当出现 1022 ssh 对话框时,我输入了内容,y然后它继续下一个过程,直到完成。

我猜当我n之前输入时,我被踢出了 ssh 会话,并且它破坏了升级过程。

这里可以学到的一个教训是,始终对你的服务器进行备份/快照,当你需要它们时你永远不会:)

希望这能帮助任何处理同样问题的人。

相关内容