Centos

yum 沒有列出儲存庫中核心的其他版本

  • September 22, 2019

我將我的 CentOS 更新到核心版本 4.4 (kernel-lt),現在想kernel-devel為新核心安裝。

這個問題建議使用以下命令:

sudo yum install "kernel-devel-uname-r == $(uname -r)"

在我的情況下uname -r,評估為4.4.193-1.el7.elrepo.x86_64

$ sudo yum install "kernel-devel-uname-r == $(uname -r)"
[sudo] password for sadik: 
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: artfiles.org
* elrepo: mirrors.nav.ro
* epel: epel.mirror.nucleus.be
* extras: mirror.23media.com
* updates: mirror.fra10.de.leaseweb.net
No package kernel-devel-uname-r == 4.4.193-1.el7.elrepo.x86_64 available.
Error: Nothing to do

當我查找源目錄時,我只能看到 3.10 版本的目錄:

$ ls /usr/src/kernels/
3.10.0-1062.1.1.el7.x86_64  3.10.0-1062.1.1.el7.x86_64.debug

我試圖尋找其他版本kernel-devel的選項--showduplicates

$ sudo yum search --showduplicates kernel-devel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: artfiles.org
* elrepo: fedora.is
* epel: mirror.de.leaseweb.net
* extras: mirror.23media.com
* updates: mirror.fra10.de.leaseweb.net
=========================================================== N/S matched: kernel-devel ===========================================================
kernel-devel-3.10.0-957.21.3.el7.centos.plus.x86_64 : Development package for building kernel modules to match the kernel
kernel-devel-3.10.0-1062.el7.x86_64 : Development package for building kernel modules to match the kernel
kernel-devel-3.10.0-1062.1.1.el7.x86_64 : Development package for building kernel modules to match the kernel
kernel-devel-3.10.0-1062.1.1.el7.x86_64 : Development package for building kernel modules to match the kernel

如何安裝kernel-develkernel-headers為目前正在執行的核心(4.4)?

你說你從 kernel-lt repo 安裝了核心,所以你需要確保你啟用該 repo 來安裝任何與核心相關的東西

yum --enablerepo=elrepo-kernel install ...

引用自:https://unix.stackexchange.com/questions/543140