I am getting this error
"Makefile:181: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop." What is this error and how to fix it?
Make sure you install Kernel Headers Package.
I just happen to need to install it also on my own server and got the same error when trying to use the virtualbox in debian repos. I went ahead and added VirtualBox repo and installed from there. This is better because they are more up-to-date.
Add line below for squeeze
Then add the The Oracle public key for apt-secure
then run update and to install latest 4.2
Install the dkms package to ensure that the VirtualBox host kernel modules are up to date
Should be good to go. Got these instructions from VirtualBox's website for Linux which seems to be down at the moment but the link is https://www.virtualbox.org/wiki/Linux_Downloads
@hhh You should search only for
So, in my case, I have an 64-bit architecture, I have to install
Another thing is
How to fix this but for Fedora
First make sure that your installed packages (especially kernel) are up to date:
After this compiling VirtualBox kernel modules should works without any problems.
Then reboot your machine