On my Linux Mint 17.1 machine I regularly face an error starting a VM. This error occurs after every kernel update. It says that the VirtualBox kernel driver was not loaded. When trying to load this driver
sudo /etc/init.d/vboxdrv setup
it gives another error:
stopping kernel drivers...done. Uninstalling old virtualbox dkms kernel modules/etc/init.d/voboxdrv: 302: /etc/init.d/vboxdrv: /usr/share/virtualbox/src/vboxhost/do_dkms: not found ...done. (Failed, trying without DKMS) recompiling VirtualBox kernel modules...failed! (look at /var/log/vbox-install.log to find out wh
at went wrong.)
/etc/init.d/vboxdrv: 334: /etc/init.d/vboxdrv: /usr/share/virtualbox/src/vboxhost/build_in_tmp: not found
This can be solved by reinstalling the virtualbox-dkms package:
sudo apt-get --reinstall install virtualbox-dkms
And then the kernel drivers are loaded:
sudo /etc/init.d/vboxdrv status VirtualBox kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) are loaded.
This workaround turned out fine for me, so I thought I could share it.