0

I updated my CentOS to kernel version 4.4 (kernel-lt) and want to install kernel-devel for the new kernel now.

This question suggests the following command:

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

In my case uname -r evaluates to 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

When I look for the source directories, I can only see the ones for version 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

I tried to look for other versions of kernel-devel with the option --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

How can I install kernel-devel or kernel-headers for the kernel that is currently running (4.4)?

1

You say you installed the kernel from kernel-lt repo, so you need to make sure you enable that repo to install anything kernel related

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.