QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 758|回复: 4

insmod的问题,翻遍公社也没找到!

[复制链接]
发表于 2004-4-28 23:03:44 | 显示全部楼层 |阅读模式
[root@Ns lkm]# gcc -c -O3 helloworld.c
[root@Ns lkm]# /sbin/insmod helloworld.o
helloworld.o: kernel-module version mismatch
        helloworld.o was compiled for kernel version 2.4.20
        while this kernel is version 2.4.20-8.
[root@Ns lkm]#

刚开始以为内核的问题(我编译过2.6),重新装9.0后还是这个样!
55555555555,我升级以后的系统就这样报废了~~~~~
发表于 2004-4-28 23:33:34 | 显示全部楼层
你升了2.6...????不会吧.......
生了2.6 的怎么会出现
while this kernel is version 2.4.20-8.
的提示?????
回复

使用道具 举报

 楼主| 发表于 2004-4-29 10:26:03 | 显示全部楼层
升级过2.6但是在2.4下是这样的提示!
我感觉2.6于2.4没什么差别,所以在2.4下编译运行的,现在我就一个2.4了(刚刚装的redhat9.0),还是这问题,没有升级任何包包!

哥哥,姐姐们救救小弟吧!
回复

使用道具 举报

发表于 2004-4-30 21:53:05 | 显示全部楼层
kernel module compilation can not be done like that. search this forum to see some helloworld example. at least u need a make file or a long gcc command line with enough cflags.
回复

使用道具 举报

 楼主| 发表于 2004-5-1 01:45:26 | 显示全部楼层
http://www.linuxfans.org/nuke/modules.php?name=Forums&file=viewtopic&t=42871&highlight=hello+world

找到了,谢谢!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-10-4 17:51 , Processed in 0.037054 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表