https://access.redhat.com/solutions/30082
SOLUTION 已验证 - 已更新 2015年九月30日21:14 -
环境
- Red Hat Enterprise Linux, all versions
问题
- What is the purpose/use of the
kernel-headers
andkernel-devel
packages? - Is it necessary to upgrade these packages along with the kernel upgrade?
决议
What is the purpose/use of the kernel-headers
and kernel-devel
packages?
- The
kernel-headers
package includes the C header files that specify the interface between the kernel and the user space libraries or programs. It is needed when building a program.
# rpm -qi kernel-headers
...
Kernel-headers includes the C header files that specify the interface
between the Linux kernel and userspace libraries and programs. The
header files define structures and constants that are needed for
building most standard programs and are also needed for rebuilding the
glibc package.
- The kernel-devel package provides the kernel headers and makefiles sufficient to build modules against the specified kernel. If your system does not need to compile/build any third-party kernel modules like HBA dirvers, display card dirvers, the
kernel-devel
package is not necessary to be installed.
rpm -qi kernel-devel
...
This package provides kernel headers and makefiles sufficient to build modules
against the kernel package.
Is it necessary to upgrade these packages along with the kernel upgrade?
-
The latest kernel can be installed in the system without the
kernel-headers
andkernel-devel
package if there are no certain reasons to use it, for example, for compiling a C code or developing/building a 3rd-party kernel module. -
In addition, it is even possible to use a different version of the
kernel-headers
package with the running kernel in the system since the kernel headers does not have any dependencies on the other packages.