I've been getting that on kernel upgrades for a while, with the result that not all of my
dkms drivers get updated on kernel-upgrades.
Firstly I was able to workaround the problem by reconfiguring any packages that used
dkms to force them to be recompiled for the current kernel - eg it was my AMD video drivers that failed (package ==
sudo dpkg-reconfigure fglrx
That would at least get the drivers configured for the current version.
Finally I found this bug, which includes some steps you can use to diagnose: https://bugs.launchpad.net/ubuntu/+source/dkms/+bug/830915
ls -R /var/lib/dkms
Basically what they're doing is looking around for anything that is surprising, or unexpected - eg packages you have uninstalled - or software you have manually installed on an earlier ubuntu version and may not work with the newer version. Particularly check the date-stamp on the directories which might show you particularly old packages could be from manually installed packages.
ls -l /var/lib/dkms
In my case I had an old version of the
fglrx install I had used to diagnose some problems a year ago and had simply re-named it. Deleting this old cruft made the problem go away.
If there's junk delete it (or move it out of that directory) - if there's a manually installed package there, consider updating it, or uninstalling it and using the maintained version.