内核技术 - 编译内核模块出错
编译内核模块出错
2004-04-23 15:18 pm来自:Linux文档
现载:Www.8s8s.coM
地址:无名
我写了个简单的LINUX KERNEL MODULE程序
编译时出现如下错误:
/usr/include/linux/modversions.h:1:2: #error Modules should never use kernel-hea
ders system headers,
/usr/include/linux/modversions.h:2:2: #error but rather headers from an appropri
ate kernel-source package.
/usr/include/linux/modversions.h:3:2: #error Change -I/usr/src/linux/include (or
similar) to
/usr/include/linux/modversions.h:4:2: #error -I/lib/modules/$(uname -r)/build/in
clude
/usr/include/linux/modversions.h:5:2: #error to build against the currently-runn
ing kernel.
1. cp /boot/vmlinuz.version.h /usr/src/linux/include/linux/version.h
2. cp /boot/vmlinux.autoconf.h /usr/src/linux/include/linux/autoconf.h