Page 1 of 1

Could not locate dkms.conf file

Posted: 27. Feb 2016, 15:22
by maxchen
hope this help someone.

I upgrade my kernel and VirtualBox, and find that VB will not start vm. A message says to run ' /sbin/rcvboxdrv setup'

Code: Select all

sudo /sbin/rcvboxdrv setup
Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modulesError! Could not locate dkms.conf file.
File: does not exist.
...done.
Trying to register the VirtualBox kernel modules using DKMS ...done.
Starting VirtualBox kernel modules ...done.
I try

Code: Select all

sudo dkms status
Error! Could not locate dkms.conf file.
File: does not exist.
I am not happy to run 'sudo /sbin/rcvboxdrv setup' each time the VB or kernel is upgraded.
after a while of google, I find out a solution

Code: Select all

for i in /var/lib/dkms/*/[^k]*/source; do [ -e "$i" ] || echo "$i";done
/var/lib/dkms/vboxhost/4.2.8/source
the old version of VB install dkms and not clear properly, remove them

Code: Select all

sudo rm -rf /var/lib/dkms/vboxhost/4.2.8
 sudo dkms status
vboxhost, 5.0.12, 4.2.0-27-generic, x86_64: installed

Re: Could not locate dkms.conf file

Posted: 5. Mar 2016, 19:31
by leolivier
Great!!! Had the same issue and fixed it using this way
Do not hesitate to remove all the old directories but the currently installed one...

Re: Could not locate dkms.conf file

Posted: 21. Jul 2016, 13:56
by vortexbased
I registered just to be able to thank you.

This has been bugging me for ages...