Ubuntu/linux 安装 kernel-devel
这个问题,需要安装与系统内核配套的开发包。
查看内核: uname -r
内核头文件C header files下载地址:
http://rpmfind.net/linux/rpm2html/search.php?query=kernel-devel
核对内核信息,在上面的网页选择合适的版本。比如原文中的:ftp://rpmfind.net/linux/fedora/releases/9/Everything/i386/os/Packages/kernel-devel-2.6.25-14.fc9.i686.rpm
重要:
内核安装完毕后,需要用这个命令确定内核 C header 的安装目录
ls -d /usr/src/kernels/$(uname -r)*/include
引用:
[root@localhost ~]# uname -r
2.6.25-14.fc9.i686
[root@localhost ~]# rpm -q kernel-devel
package kernel-devel is not installed
[root@localhost ~]# cd /home
[root@localhost home]# wget ftp://rpmfind.net/linux/fedora/releases/9/Everything/i386/os/Packages/kernel-devel-2.6.25-14.fc9.i686.rpm
[root@localhost home]# rpm -i kernel-devel-2.6.25-14.fc9.i686.rpm
[root@localhost home]# rpm -q kernel-devel
kernel-devel-2.6.25-14.fc9.i686
参考:linux安装kernel-devel
2016/10/15
To improve is to change, to be perfect is to change often.