Missing yum packages for centos 7 when installing vagrant

I just installed centos 7 and then try to install vagrant. After installing virtualbox roaming, when I start roaming, I get:

VirtualBox is complaining that the kernel module is not loaded. Please
run `VBoxManage --version` or open the VirtualBox GUI to see the error
message which should contain instructions on how to fix this error.

      

I run "VBoxManage --version" and I get the error

The vboxdrv kernel module is not loaded. Please recompile the kernel module and install it by sudo /etc/init.d/vboxdrv setup

      

I run sudo / etc / init.d / vboxdrv setup and I get

Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> 

      

What are the missing packages?

+3


source to share


2 answers


You need to install "gcc" and "kernel-devel":

sudo yum install gcc kernel-devel

      

then run the command to recompile the virtual window:



sudo /etc/init.d/vboxdrv setup

      

now you can run:

vagrant up

      

+4


source


Step 2 didn't work for me:

sudo: /etc/init.d/vboxdrv: command not found

      

found this on another thread that worked fine:



sudo /usr/lib/virtualbox/vboxdrv.sh setup

      

Hope it helps;)

+1


source







All Articles