在 Ubuntu 上,我在使用一個新核心 ( ) 時遇到了一些問題,4.18.0-20
因此我在一個舊核心 ( 4.18.0-15
) 上重新啟動。
現在我想卸載新核心以防止任何混淆,但這樣做是apt
為了安裝更新的核心:
apt -s remove linux-image-4.18.0-20-generic
NOTE: This is only a simulation!
apt needs root privileges for real execution.
Keep also in mind that locking is deactivated,
so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
linux-generic-hwe-18.04 linux-headers-4.18.0-21
linux-headers-4.18.0-21-generic linux-headers-generic-hwe-18.04
linux-image-4.18.0-21-generic linux-image-generic-hwe-18.04
linux-modules-4.18.0-21-generic linux-modules-extra-4.18.0-21-generic
The following packages will be REMOVED:
linux-image-4.18.0-20-generic linux-modules-extra-4.18.0-20-generic
The following NEW packages will be installed:
linux-headers-4.18.0-21 linux-headers-4.18.0-21-generic linux-image-4.18.0-21-generic
linux-modules-4.18.0-21-generic linux-modules-extra-4.18.0-21-generic
The following packages will be upgraded:
linux-generic-hwe-18.04 linux-headers-generic-hwe-18.04 linux-image-generic-hwe-18.04
因此apt
想要安裝內核,4.18.0-21
因為它刪除了4.18.0-20
.
我該如何解釋這不是我想要的?
答案1
問題來自於linux-image-generic-hwe-18.04
包裹
正是這個帶來了混亂。
解決方案:刪除它並安裝linux-image-generic
:
sudo apt install linux-image-4.18.0-20-generic
sudo apt remove linux-image-generic-hwe-18.04
如果需要的話,對包也可以做同樣的事情linux-headers*
。
如果您想將內核設為特定內核,您可以手動安裝它,例如
sudo apt install linux-image-generic
sudo apt remove linux-image-generic-hwe-18.04