VirtualBox Guest Additions on Linux | Missing kernel headers

If you think the VirtualBox Guest Additions has not installed correctly/completely, do the following:
sudo /etc/init.d/vboxadd setup
If there are any error messages, please refer to the following file for hints.
/var/log/vboxadd-install.log
If there are errors similar to the one shown below, read further for the solution.
/tmp/vbox.0/Makefile.include.header:97: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.
Install the headers for the current running kernel.
sudo apt-get install linux-headers-$(uname -r)
Re-install the Guest Additions.
sudo /etc/init.d/vboxadd setup
Try if things are working fine. Say mount a shared folder.
sudo mount -t vboxsf share /home/jack/host
The above scenario was faced and resolved on Debian Squeeze. The commands should hold good for any Linux distro.

No comments:

Post a Comment