anyka 发表于 2004-3-17 09:52:37

关于模块编程

译出来的*.o文件在用insmod命令插入的时候,总是报错,错误有两种:
一:
# insmod firewall.o
firewall.o: kernel-module version mismatch
firewall.o was compiled for kernel version 2.4.20
while this kernel is version 2.4.20-8smp.

二:
# insmod hello.o
hello.o: couldn't find the kernel version the module was compiled for

是不是我编译的命令有问题,应该是怎么的呢,或者是程序里面该加些什么定义呢???

Dragonfly 发表于 2004-3-18 00:50:12

no, u are using redhat kernel, u install from rpm but the kernel source version is mismatch with the running kernel. so u can insmod -f if u are lazy to recompile a kenrel and run that new kernel
页: [1]
查看完整版本: 关于模块编程