2

I upgraded Kernel to 5.x referring this blog.

Now, when I run uname -r, the kernal version shows 5.x. However, the kernel-devel and kernel-headers are still 4.x.

What I tried?

Uninstalled kernel-devel and kernel-headers by executing the following commands:

yum remove kernel-devel
yum remove kernel-headers
yum install "kernel-devel-uname-r == $(uname -r)" --> Throws no package found error
yum install "kernel-headers-uname-r == $(uname -r)" --> Throws no package found error

I tried clearing all the 4.x versions of kernel.

After that, when I try to install kernel-devel and kernel-headers again, it still installs version 4.x and not 5.x.

Please advise how to install kernel-devel and kernel-headers mathching 5.x kernel.

MAK
  • 1,915
  • 4
  • 20
  • 44
  • If you install kernel from non-standard repository, then standard repositories doesn't have devel (and header) package for that kernel. For these packages you usually need to consult the same repository which you used for install the kernel. Assuming you install the kernel with `dnf --enablerepo=elrepo-kernel install kernel-ml`, you could try to install devel package with `dnf --enablerepo=elrepo-kernel install kernel-ml-devel`. See also their wiki: http://elrepo.org/tiki/kernel-ml. – Tsyvarev Oct 04 '21 at 06:45

1 Answers1

2

You may refer to this article, by execute this command sudo yum --enablerepo=elrepo-kernel install kernel-ml-{devel,headers,perf}

weifan01
  • 159
  • 1
  • 4
  • I choose to install the long-term version, devel and headers are found, but perf is not found. `kernel-lt-perf` is not found! – gfan Oct 30 '22 at 08:35
  • Find the package:`$ sudo yum --disablerepo="*" --enablerepo="elrepo-kernel" list available | grep perf`. then as per the out of the package name, just use perf: `sudo yum --enablerepo=elrepo-kernel install perf` – gfan Oct 30 '22 at 08:44