Linux – Error running Virtual Box on Arch Linux

arch linuxvirtualbox

I installed Virtual Box regularly on Arch Linux using pacman:

pacman -S virtualbox

When i run virtualbox from the terminal, the GUI of the program is loaded but I can't use a virtual machine and I get this warning:

The vboxdrv kernel module is not loaded. Either there is no module
         available for the current kernel (3.12.5-1-ARCH) or it failed to
         load. Please reinstall the kernel module virtualbox-host-modules or
         if you don't use our stock kernel compile the modules with

           sudo dkms autoinstall

How to solve the problem?

Best Answer

I checked and I already had installed virtualbox-host-modules , then I tried to reinstall it. That wasn't enough. Then I tried the command sudo dkms autoinstall. Dkms isn't installed by default so I had to install dkms package. Then I started the service by typing sudo systemctl enable dkms.service . Then I could try with sudo dkms autoinstall again. I tried starting virtualbox again but I still got an error. Then I tried to manually load to module vboxdrv by typing modprobe vboxdrv . Now virtualbox is working.