38
15
I am getting this error:
Makefile:181: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again. Stop.
Basically I'm doing:
$ sudo /etc/init.d/vboxdrv setup
Removing existing VirtualBox non-DKMS kernel modules [ OK ]
Building the VirtualBox Guest Additions kernel modules
The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.
The missing package can be probably installed with
yum install kernel-devel-2.6.32-573.18.1.el6.x86_64
Building the main Guest Additions module [FAILED]
(Look at /var/log/vboxadd-install.log to find out what went wrong)
And the error is:
Makefile:181: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again. Stop
What is this error and how to fix it?
@hhh Some distributions don't have the repositories of the linux-header. you can check this one: http://www.computingforgeeks.com/2015/08/how-to-install-linux-kernel-headers-on.html
– warmblue – 2016-01-07T08:39:07.120None of these answers worked for me because the distro I downloaded had an older kernel than that available in repos. I had to run
apt-get update && apt-get -y dist-upgrade
. – Plato – 2017-04-04T04:56:51.1972The command
apt-cache search linux-headers-$(uname -r)
returns nothing for me even though I did the above commands. – hhh – 2012-11-03T22:12:39.960@hhh I think this answer is good one, and should be accepted. I do not know what you want with this **linux-headers-$(uname -r) **. Please, explain or open a new question. I think this thread is finished. – Léo Léopold Hertz 준영 – 2013-11-20T15:37:24.480