Installing kernel headers on CentOS 8 for VirtualBox

9.5k Views Asked by At

This is a follow-up to

RHEL: This system is currently not set up to build kernel modules

I get the same error messages running /sbin/vboxconfig as over there.

I have the following:

pkg $ uname -r
4.18.0-193.el8.x86_64
pkg $ rpm -qa| grep kernel-devel
kernel-devel-4.18.0-193.19.1.el8_2.x86_64

So the devel package is for a subversion (pun intended) of the installed kernel. That version is installed when I do dnf install kernel-devel and I cannot install by the command suggested with $( uname -r).

What should I do to make this work?

1

There are 1 best solutions below

0
On BEST ANSWER

Answer

https://unix.stackexchange.com/a/597701/46710

Followed by reboot in case a new kernel gets installed should fix it for you.

helped: the reboot solved my problem, /sbin/vboxconfig ran smoothly afterwards.