Kernel Headers

What are Kernel Headers?

When installing certain Linux software, you might have come across the term "Kernel Headers" and wondered why the software you were installing required it. Surely, you already have your kernel installed on your dedicated server, so what are they talking about?

Kernel Headers refer to the source code of the Linux Kernel. On most binary distributions (RedHat, SUSE, Debian etc.), only the binary form of the kernel is installed by default. This usually takes the form of a package called Linux-image-(Version Number) or something similar. In order to compile software into a kernel module, that software requires the actual source code for the kernel, called kernel headers.

Normally, software does not require direct access into the kernel, but for some software, virtualization for example, it needs to create kernel modules. It does this by compiling the modules for your specific kernel version. Therefore, you must have the kernel headers for the current version of your kernel installed. To find out which version you currently have installed,
type
                   "uname -a" (without quotes) from a command line.

Next, find the kernel headers in your package management system (i.e. YUM or APT) and install them. Once installed, you should be able to complete the installation of whatever software you are trying to use.

Third- party kernel modules will need to be recompiled every time  you upgrade to a new kernel version. Many virtualization programs will do this automatically when you perform the update, as long as the kernel headers package is updated at the same time. If it does not happen automatically, you will need to manually do it each time.



Comments

Popular posts from this blog

Managing Vm's with Virish

How Yum Works?

Steps to install Ubuntu