我需要手动安装(通过apt
)一个特定的内核版本,该版本支持 USB 开发的较新 USB-C 功能——特别linux-image-4.18.0-25-generic
是 Ubuntu apt 存储库中的版本。
现在,每当我尝试执行 时apt upgrade
,它都会想要安装旧的内核版本:
$ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
fwupd-signed libxmlb1 linux-headers-4.15.0-73 linux-headers-4.15.0-73-generic linux-image-4.15.0-73-generic linux-modules-4.15.0-73-generic linux-modules-extra-4.15.0-73-generic
< ... snip ... >
apt-mark hold
所以我尝试使用以下命令保留当前的内核:
$ sudo apt-mark hold linux-headers-4.18.0-25-generic linux-headers-4.18.0-25 linux-image-4.18.0-25-generic linux-modules-4.18.0-25-generic linux-modules-extra-4.18.0-25-generic
linux-headers-4.18.0-25-generic set on hold.
linux-headers-4.18.0-25 set on hold.
linux-image-4.18.0-25-generic set on hold.
linux-modules-4.18.0-25-generic set on hold.
linux-modules-extra-4.18.0-25-generic set on hold.
但是当我运行时apt upgrade
,它仍然尝试获取旧内核并打印与上面完全相同的确认提示。
如何在 后保留当前(较新)的内核版本apt upgrade
?