Symptoms

The following message appears during the building stage of VirtualBox Guest Additions:
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.

Solution

First check whether your system includes kernel headers matching your currently running kernel. For example:
# dpkg --get-selections | grep linux-headers
linux-headers-3.13.0-53                         install
linux-headers-3.13.0-53-generic                 install
linux-headers-generic                           install
# uname -r
3.13.0-53-generic
The above message about missing header can be a little bit misleading so make sure that all other components required to build VirtualBox Guest Additions are available. Run ta below command to ensure that all compilation prerequisites to build VirtualBox Guest Additions are met before you run build command:
# apt-get install linux-headers-`uname -r` dkms build-essential
ARE YOU LOOKING FOR A LINUX JOB?
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed on LinuxCareers.com.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in: