kernel-devel is necessary to build modules such as devices
On CentOS(rpm-based OS), install Linux Kernel-devel with consistency with kernel
By the way, kernel-devel seems to contain the minimum source necessary for building modules
[vagrant@localhost ~]$ rpm -qa | grep kernel
kernel-devel-2.6.32-754.2.1.el6.x86_64
kernel-2.6.32-754.3.5.el6.x86_64
kernel-firmware-2.6.32-754.3.5.el6.noarch
dracut-kernel-004-411.el6.noarch
kernel-headers-2.6.32-754.3.5.el6.x86_64
kernel-devel-2.6.32-754.3.5.el6.x86_64
kernel-2.6.32-754.2.1.el6.x86_64
kernel-2.6.32-642.el6.x86_64
kernel-devel, kernel-headers ともに入ってますね。
kernel-headers
A C language header file related to the kernel is packaged.
It is necessary for rebuilding the kernel and compiling system related programs.
[vagrant@localhost ~]$ rpm -qi kernel-headers
Name : kernel-headers Relocations: (not relocatable)
Version : 2.6.32 Vendor: CentOS
Release : 754.3.5.el6 Build Date: 2018年08月15日 06時04分13秒
Install Date: 2018年10月07日 19時48分45秒 Build Host: x86-01.bsys.centos.org
Group : Development/System Source RPM: kernel-2.6.32-754.3.5.el6.src.rpm
Size : 2776586 License: GPLv2
Signature : RSA/SHA1, 2018年08月15日 10時59分21秒, Key ID 0946fca2c105b9de
Packager : CentOS BuildSystem
URL : http://www.kernel.org/
Summary : Header files for the Linux kernel for use by glibc
Description :
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.
ん? Linux kernelのことか?
[vagrant@localhost ~]$ rpm -ql kernel-headers | more
/usr/include/asm
/usr/include/asm-generic
/usr/include/asm-generic/auxvec.h
/usr/include/asm-generic/bitsperlong.h
/usr/include/asm-generic/errno-base.h
/usr/include/asm-generic/errno.h
/usr/include/asm-generic/fcntl.h
/usr/include/asm-generic/int-l64.h
/usr/include/asm-generic/int-ll64.h
/usr/include/asm-generic/ioctl.h
/usr/include/asm-generic/ioctls.h
/usr/include/asm-generic/ipcbuf.h
/usr/include/asm-generic/mman-common.h
/usr/include/asm-generic/mman.h
/usr/include/asm-generic/msgbuf.h
/usr/include/asm-generic/param.h
/usr/include/asm-generic/poll.h
/usr/include/asm-generic/posix_types.h
/usr/include/asm-generic/resource.h
/usr/include/asm-generic/sembuf.h
/usr/include/asm-generic/setup.h
/usr/include/asm-generic/shmbuf.h
/usr/include/asm-generic/shmparam.h