TL; 博士
从 18.04.1 升级到 18.04.2 后,我无法强制我的 ubuntu 服务器将内核升级到相应的 4.18 版本。
历史背景
昨天我跑
sudo apt upgrade
Run Code Online (Sandbox Code Playgroud)
并且在其中一个次要文件上发生了冲突(我认为是/etc/issue.net)。不幸的是,在解决那个冲突的过程中,我不小心关闭了腻子……当我重新登录时,我锁定了apt数据库。我重新启动了我的服务器并执行
sudo dpkg --configure -a
Run Code Online (Sandbox Code Playgroud)
然后sudo apt upgrade就顺利了。重新启动服务器后,我在欢迎消息中看到我的系统已更新,但内核仍为 4.15 版本。
Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-45-generic x86_64)
Run Code Online (Sandbox Code Playgroud)
到目前为止我尝试过的
我尝试了所有可以在 Internet 上找到的解决方案,但都没有帮助:
rychu@RychuSRV:~$ sudo apt update
Hit:1 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Hit:4 https://download.docker.com/linux/ubuntu bionic InRelease
Get:5 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Fetched 177 kB in 1s (161 kB/s)
Reading …Run Code Online (Sandbox Code Playgroud) 我不确定它是apt设置shell还是设置,但是每当配置文件发生冲突时,apt upgrade我都会看到以下选项:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences betweeen the versions
Z : start a shell to examine the situation
Run Code Online (Sandbox Code Playgroud)
是否可以更改D选项以使用其他内容(例如,mcdiff)?
使用Z选项sudo mcdiff $DPKG_CONFFILE_OLD $DPKG_CONFFILE_NEW然后然后exit有点烦人。