Kernel headers installed but not found

Discussions about using Linux guests in VirtualBox.
Post Reply
Mark81
Posts: 3
Joined: 16. Jun 2016, 08:12

Kernel headers installed but not found

Post by Mark81 »

Hello,
I was running Debian Jessie as Linux Guest, when I upgraded to Debian Stretch. I reinstalled the VBox Additions in this way:

Code: Select all

login as root
m-a prepare
sh VBoxLinuxAdditions.run
It fails because it doesn't find the kernel headers:
The headers for the current running kernel were not found. If the following module compilation fails then this could be the reason.
Building the main Guest Additions module ...fail!
But:

Code: Select all

uname -r
4.6.0-1-amd64
and:

Code: Select all

ls /lib/modules/
4.6.0-1-amd64
So the correct headers are available.
Inspecting var/log/vboxadd-install.log I found:

Code: Select all

grep: /lib/modules/4.6.0-1-amd64/build/include/linux/version.h: No such file or directory
Well, the path is actually wrong. linux/version.h is available under /usr/include/linux/ or /usr/src/linux-headers-4.6.0-1-amd64/include/generated/uapi/linux/.
It's a common behavior? How to tell VBox installer where to find that file?
Post Reply