I have installed vitualbox on Debian Jessie according to instructions on debian wiki.
By running:

apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') virtualbox

During installation some errors were reported.
Now I want to re-configure virtualbox-dkms but I receive this error:

Loading new virtualbox-4.3.18 DKMS files...
Building only for 3.16-3-amd64
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.

Note: uname -r shows 3.16-3-amd64 but my source folder in /usr/src is named:

I don't know what to do!

2 Answers 2



$ sudo apt-get update
$ sudo apt-get install linux-headers-`uname -r`

If that second command still fails to find anything, then:

$ apt-cache search linux-headers-

to list all the linux-headers packages available.

At least one should match the kernel you are running (as displayed by uname -r).


sudo apt-get install linux-headers-<version number>
  • 1
    I still get this error, even with the headers installed using this command.
    – Cerin
    May 18, 2016 at 19:43

I did all of these solutions but problem was about my kernel!

linux-headers-uname -r wanted to install 3.16.0-3 headers due to my kernel version but there is no such linux kernel header in Debian repos: There is 3.16.0-4

Solution: upgrade my kernel via apt-get then everything works fine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .