How to install VirtualBox Guest Additions on CentOS 7 Linux - LinuxConfig.org

The objective is to install VirtualBox Guest Additions on CentOS 7 Linux.
This is a companion discussion topic for the original entry at https://linuxconfig.org/how-to-install-virtualbox-guest-additions-on-centos-7-linux

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.

Regards
Jaime

Jaime,

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

elfutils-libelf-devel-0.176-2.el7.i686.rpm
libelf-0.8.13-3-mdv2012.0.x86_64.rpm
libelf-devel-0.8.2-2.i386.rpm
libelf-locales-0.8.13-3-mdv2012.0.noarch.rpm

this will also fix “modprobe vboxguest failed” error

cheers

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