Linux

安裝新的 OpenVZ 核心時出錯

  • December 15, 2014

在 OpenVZ 伺服器上更新核心時似乎出現錯誤

執行“yum update”時,我得到以下資訊

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.steadfast.net
* extras: mirror.steadfast.net
* openvz-kernel-rhel6: download.openvz.org
* openvz-utils: download.openvz.org
* soluslabs: mirror.us1.soluslabs.net
* updates: mirror.steadfast.net
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package kernel.x86_64 0:2.6.32-431.20.3.el6 will be installed
--> Processing Dependency: kernel-firmware >= 2.6.32-431.20.3.el6 for package: kernel-  2.6.32-431.20.3.el6.x86_64
Package kernel-firmware-2.6.32-431.20.3.el6.noarch is obsoleted by vzkernel-firmware- 2.6.32-042stab090.2.noarch which is already installed
---> Package kernel-headers.x86_64 0:2.6.32-431.17.1.el6 will be updated
---> Package kernel-headers.x86_64 0:2.6.32-431.20.3.el6 will be an update
---> Package libxml2.x86_64 0:2.7.6-14.el6_5.1 will be updated
---> Package libxml2.x86_64 0:2.7.6-14.el6_5.2 will be an update
---> Package tzdata.noarch 0:2014d-1.el6 will be updated
---> Package tzdata.noarch 0:2014e-1.el6 will be an update
---> Package vzkernel.x86_64 0:2.6.32-042stab090.4 will be installed
---> Package vzkernel-firmware.noarch 0:2.6.32-042stab090.2 will be updated
---> Package vzkernel-firmware.noarch 0:2.6.32-042stab090.4 will be an update
--> Finished Dependency Resolution
Error: Package: kernel-2.6.32-431.20.3.el6.x86_64 (updates)
      Requires: kernel-firmware >= 2.6.32-431.20.3.el6
      Removing: vzkernel-firmware-2.6.32-042stab090.2.noarch (@openvz-kernel-rhel6)
          kernel-firmware = 2.6.32-431.17.1.el6
      Updated By: vzkernel-firmware-2.6.32-042stab090.4.noarch (openvz-kernel-rhel6)
          kernel-firmware = 2.6.32-431.17.1.el6
      Available: kernel-firmware-2.6.32-431.el6.noarch (base)
          kernel-firmware = 2.6.32-431.el6
      Available: kernel-firmware-2.6.32-431.1.2.0.1.el6.noarch (updates)
          kernel-firmware = 2.6.32-431.1.2.0.1.el6
      Available: kernel-firmware-2.6.32-431.3.1.el6.noarch (updates)
          kernel-firmware = 2.6.32-431.3.1.el6
      Available: kernel-firmware-2.6.32-431.5.1.el6.noarch (updates)
          kernel-firmware = 2.6.32-431.5.1.el6
      Available: kernel-firmware-2.6.32-431.11.2.el6.noarch (updates)
          kernel-firmware = 2.6.32-431.11.2.el6
      Available: kernel-firmware-2.6.32-431.17.1.el6.noarch (updates)
          kernel-firmware = 2.6.32-431.17.1.el6
      Available: kernel-firmware-2.6.32-431.20.3.el6.noarch (updates)
          kernel-firmware = 2.6.32-431.20.3.el6
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

grub.conf 的內容

default=0
timeout=5

title OpenVZ (2.6.32-042stab090.2)
kernel /boot/vmlinuz-2.6.32-042stab090.2 root=/dev/sda2  ro crashkernel=auto SYSFONT=latarcyrheb-sun16 LANG=en_US.UTF-8 KEYTABLE=us
root (hd0,1)
initrd /boot/initramfs-2.6.32-042stab090.2.img
title OpenVZ (2.6.32-042stab088.4)
kernel /boot/vmlinuz-2.6.32-042stab088.4 root=/dev/sda2  ro crashkernel=auto       SYSFONT=latarcyrheb-sun16 LANG=en_US.UTF-8 KEYTABLE=us
root (hd0,1)
initrd /boot/initramfs-2.6.32-042stab088.4.img
title linux centos6_64
kernel /boot/vmlinuz-2.6.32-431.17.1.el6.x86_64 root=/dev/sda2  ro
root (hd0,1)
initrd /boot/initrd-2.6.32-431.17.1.el6.x86_64.img

謝謝

在您的系統vzkernel-firmware中與kernel-firmware. 因為 vzkernel 包來自標準包儲存庫之外,所以這種衝突並不罕見。

假設您不使用原始 CentOS 核心,解決此問題的最簡單方法是刪除它。為此執行:

yum remove kernel kernel-firmware

在繼續檢查它不會刪除您需要的任何包之前。

根據官方答案,接受的答案不正確

https://wiki.openvz.org/Vzkernel-firmware


正確答案:

您需要vzkernel-firmware通過執行以下命令來刪除:

rpm -e vzkernel-firmware

然後將以下內容添加到/etc/yum.repos.d/openvz.repo

exclude=vzkernel-firmware

引用自:https://serverfault.com/questions/607082