How to install VirtualBox Guest Additions on CentOS 7 Linux -

The objective is to install VirtualBox Guest Additions on CentOS 7 Linux.
This is a companion discussion topic for the original entry at

It would be perfect if you also include possible errors.

In my case, this is the fresh copy of Virtual Box image for Centos 7, I tried your steps, but the addons installer insists in requesting kernel headers even when I have installed them.

Then, I have updated all the system using “yum update”… now kernel is version 957 but addons is still requesting for the 862 kernel.



All I had to do was :

  1. #yum install kernel
  2. #yum install kernel-devel
  3. #yum install gcc

Then, I ran the software and rebooted my machine.

It’s working!

Installing Guest Additions on Centos 8 is the same process. you will need elfutils installed.

I had to install these 4 manually and then the install was successful on CentOS 8


this will also fix “modprobe vboxguest failed” error


Here is guide on how to install Virtual Guest additions on CentOS 8.

Great article. Wish I had seen that before messing with it for 20 minutes