在redhat9x下边先了个 helloworld.c的module,编译通过之后insmod的时候提示说:
helloworld.o was compiled for kernel version 2.4.20
while this kernel is version 2.4.20-8.
后来受下面这段话的启发,而有所获:呵呵
make sure the result of 'uname -r'
is the same with the definition of UTS_RELEASE in
/usr/src/linux/include/linux/version.h.
If not, please modify the definition of UTS_RELEASE
in /usr/src/linux/include/linux/version.h
加载模块的时候出现版本不匹配的问题
最新推荐文章于 2025-03-18 16:57:18 发布
在 Redhat 9x 系统下编译 helloworld.c 模块,insmod 时提示内核版本不匹配。编译的模块适用于 2.4.20 版本,而当前内核是 2.4.20 - 8。可通过确保 'uname -r' 结果与 /usr/src/linux/include/linux/version.h 中 UTS_RELEASE 定义一致来解决。
1万+

被折叠的 条评论
为什么被折叠?



