dkms does not automatically rebuild after kernel upgrade

Solution 1:

From the comments...

There were multiple problems to solve.

  • we removed the /usr/src/gmock and /usr/src/gtest as they weren't dkms software modules. If you need this software for some reason, either reinstall it, or create ~/src and put the gmock/gtest software there, and do the appropriate make commands (or whatever) to build that software.

  • we removed the /var/lib/dkms/anbox* directories as they were missing their associated /usr/src/anbox* source code due to an incomplete uninstall, and caused the dkms status command to fail, looking for a dkms.conf file that didn't exist.

  • the dkms status now correctly shows the installed status of bbswitch, nividia, and virtualbox dkms softwares.

  • future kernel upgrades should properly build/rebuild the remaining bbsswitch, nividia, and virtualbox dkms software modules.

  • we also checked that the virtualbox-dkms was the correct version for the installed virtualbox.