When installing a package that includes a kernel module (in my case, openafs-modules-dkms), package configuration fails because DKMS fails to find modules even though package linux-headers-$(uname -r) is already installed.

Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.

DKMS is trying to follow build symlink inside the /lib/modules (not sure why it's not there), so create it:

# ln -s /usr/src/linux-headers-$(uname -r)  /lib/modules/$(uname -r)/build

This was found by checking the file system calls made by dkms:

# strace -f -e trace=file dpkg-reconfigure <package> >/tmp/dkms.log 2>&1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.