我正在使用 do-release-upgrade 从 18.04 升级到 20.04。
在此过程中,它发现了我的 ssh_config 的修改,我选择查看差异。
它将在页面<OK>底部显示此内容。但我无法退出继续升级。终端正在读取我的键盘输入。屏幕现在看起来像这样:
您可以看到我恢复升级的一些尝试(例如重新运行do-release-upgrade、尝试apt update和apt upgrade)
如何恢复升级?
深入挖掘会发现哪些进程拥有各种锁定文件,以及一些仍在运行的有趣进程,可能正在等待我<OK>在屏幕上回复,显示 ssh_config 差异:
matt@ocinara:~$ sudo lsof /var/lib/dpkg/lock
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1001/gvfs
Output information may be incomplete.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
dpkg 16341 root 3uW REG 259,3 0 13658619 /var/lib/dpkg/lock
matt@ocinara:~$ sudo lsof /var/lib/apt/lists/lock
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1001/gvfs
Output information may be incomplete.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
focal 14627 root 14u REG 259,3 0 13902278 /var/lib/apt/lists/lock
matt@ocinara:~$ sudo lsof /var/cache/apt/archives/lock
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1001/gvfs
Output information may be incomplete.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
focal 14627 root 66u REG 259,3 0 12328392 /var/cache/apt/archives/lock
matt@ocinara:~$ ps aux | grep -i focal
root 14627 0.2 1.7 480372 140020 pts/0 S 11:00 0:09 /usr/bin/python3 /tmp/ubuntu-release-upgrader-qzt422az/focal --mode=server --frontend=DistUpgradeViewText
matt 19736 0.0 0.0 10964 780 pts/3 S+ 12:00 0:00 grep --color=auto -i focal
matt@ocinara:~$ ps aux | grep -i dpkg
root 16341 0.0 0.1 22216 12776 pts/7 Ss+ 11:01 0:00 /usr/bin/dpkg --force-overwrite --status-fd 74 --configure --pending
root 17176 0.0 0.3 85264 24040 pts/7 S+ 11:01 0:00 /usr/bin/perl -w /usr/share/debconf/frontend /var/lib/dpkg/info/openssh-server.postinst configure 1:7.6p1-4ubuntu0.3
root 17188 0.0 0.0 2604 1684 pts/7 S+ 11:01 0:00 /bin/sh /var/lib/dpkg/info/openssh-server.postinst configure 1:7.6p1-4ubuntu0.3
matt 19741 0.0 0.0 10964 776 pts/3 S+ 12:01 0:00 grep --color=auto -i dpkg
Run Code Online (Sandbox Code Playgroud)
经过更多阅读后,我再次运行升级,如下所示:
sudo kill 14627 # focal upgrade process - see question
Run Code Online (Sandbox Code Playgroud)
这也导致dpkg进程(参见原始问题)终止,并且文件锁被释放。然后我尝试了
sudo apt dist-upgrade
Run Code Online (Sandbox Code Playgroud)
...这告诉我首先要做到这一点:
sudo dpkg --configure -a
Run Code Online (Sandbox Code Playgroud)
这立即导致回到有关 ssh_config 的问题,即回到升级停止时的位置(我怀疑我无意中按下了 Ctrl-C)。
最后(手指交叉):
sudo apt dist-upgrade
Run Code Online (Sandbox Code Playgroud)
当我写这篇文章时,我现在已经完成了 15% 的升级。我稍后会更新这个答案,希望是从 Ubuntu 20.04 开始!
更新它有效 - 我现在使用的是 Ubuntu 20.04
| 归档时间: |
|
| 查看次数: |
2082 次 |
| 最近记录: |