Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

missing yum packages for centos 7 when installing vagrant

I have just installed centos 7 and then I try to install vagrant. After installing virtualbox then vagrant when I run vagrant up 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 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?

like image 827
TroodoN-Mike Avatar asked Dec 11 '25 01:12

TroodoN-Mike


1 Answers

You have to install "gcc" and "kernel-devel" by:

sudo yum install gcc kernel-devel

then run to recompile virtual box:

sudo /etc/init.d/vboxdrv setup

you can now run:

vagrant up
like image 167
TroodoN-Mike Avatar answered Dec 13 '25 19:12

TroodoN-Mike



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!