我有一个运行 squeeze 的 xen 盒子。
从未正确升级linux-image-2.6.32-5-686-bigmem
,我想阻止它再升级。每次我运行时它都会尝试并失败,这很烦人apt-get
。
我发出
echo "linux-image-2.6.32-5-686-bigmem hold" | dpkg --set-selections
echo "linux-image-686-bigmem hold" | dpkg --set-selections
我得到了
root@y:/etc# dpkg --get-selections | grep hold
linux-image-2.6.32-5-686-bigmem hold
linux-image-686-bigmem hold
但它仍在尝试升级
root@y:/etc# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? Y
Setting up linux-image-2.6.32-5-686-bigmem (2.6.32-31) ...
并失败了。
我收到以下回复dpkg -l linux-image-2.6.32-5-686-bigmem
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
hF linux-image-2. 2.6.32-31 Linux 2.6.32 for PCs with 4GB+ RAM
是 hF,不是 hi。
答案1
我一直将内核保存在服务器上,所以我知道它总体上是有效的。“1 未完全安装或删除”让我担心。我的dpkg -l linux-image-2.6.26-2-686-bigmem
(在 lenny 上)显示:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
hi linux-image-2. 2.6.26-25lenny Linux 2.6.26 image on PPro/Celeron/PII/PIII/
以hi
开头。我猜你的显示的是其他内容?
答案2
您可以前往Synaptic>软件包>锁定版本。
我遇到的另一个选项是 apt-pinning。这是相关教程。