Comment 12 for bug 830915

Revision history for this message
Nick Jenkins (nickpj) wrote : Re: [Oneiric] Error during kernel upgrade: Could not locate dkms.conf file

You might have some other directories left over from an old version of virtualbox under /var/lib/dkms/ . For example, I had some directories left over from 3.2.6, and the fix for me was:

sudo rm -r /var/lib/dkms/vboxnetadp /var/lib/dkms/vboxdrv /var/lib/dkms/vboxnetflt

Basically you should check the timestamps of any directories under /var/lib/dkms that start with either 'vbox' or 'virtual'. If they're fairly old (e.g. > 1 year) then there's a reasonable chance that they might be cruft left over from an old version of VirtualBox. Deciding whether to delete them or not is at your discretion.

And really, there are 2 entirely separate software problems here:
1) VirtualBox should clean up after itself by removing these old directories when being uninstalled or upgraded.
2) dkms should be explicit and unambiguous about which directory it has a problem with. For example there would be a LOT less confusion all round if it said "Error in directory /var/lib/dkms/vboxdrv , belonging to package 'virtualbox' - Could not locate dkms.conf file." instead of the completely non-specific: "Error! Could not locate dkms.conf file."