yum 没有在存储库中列出内核的其他版本

yum 没有在存储库中列出内核的其他版本

我将我的 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-devel当前kernel-headers正在运行的内核 (4.4)?

答案1

您说您从 kernel-lt 存储库安装了内核,因此您需要确保启用该存储库来安装任何与内核相关的内容

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

相关内容