Question: I am trying to install virtualbox5.2 on a RHEL 7 VM When I try to rebuild kernels modules I get the following error:

```
[root@myserver~]# /usr/lib/virtualbox/vboxdrv.sh setup
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    kernel-devel kernel-devel-3.10.0-693.11.1.el7.x86_64

```

I tried install kernet-devel and got success message

```
Installed:
  kernel-devel.x86_64 0:3.10.0-693.21.1.el7                                     

Complete!

```

But still the setup fails.

Any idea what is missing here?

Answer: 
The same message happened when I tried to upgrade VirtualBox 5.2.12 Guest Additions on my Kali Linux (GNU/Linux Rolling version). I fixed it by following steps:

1. Do apt update/upgrade to keep your system up-to-date. Do not forget to reboot the system.
2. Run "apt-get install linux-headers-$(uname -r)".
3. Run VBoxLinuxAdditions.run from terminal, error message gone and Guest Additions will be installed successfully.
4. Reboot system, Guest Additions works fine.
to solve this problem I ran `yum update -y`. I think this is the fastest way to solve it. Another solution is to configure the repos with the installation DVD, so you can install the kernel-headers of your current version of CentOS.

My History:

* `yum install epel-release`
* `yum install perl gcc dkms kernel-devel kernel-headers make bzip2`
* `yum groupinstall "Development tools"`
* `yum update -y`
* `reboot`

After that, I mount de VBoxGuestAdditions and I ran the process