加载模块说版本不对?
时间:2006-03-17
来源:互联网
[root@mb src]# insmod scsi_tgt.o
scsi_tgt.o: kernel-module version mismatch
scsi_tgt.o was compiled for kernel version 2.4.20-8custom
while this kernel is version 2.4.20-8.
[root@mb src]# uname -a
Linux mb.hustraid 2.4.20-8 #1 Thu Mar 13 17:54:28 EST 2003 i686 i686 i386 GNU/Linux
我是在version 2.4.20-8下编译的scsi_tgt.o模块啊,可是加载的时候却报错,怎么回事啊,我最后看了下usr/src下的文件如下:
[root@mb src]# ls -l
总用量 12828
drwxr-xr-x 2 root root 4096 2003-01-25 debug
drwxr-xr-x 15 1046 1046 4096 3月 17 11:00 linux
-r-x------ 1 root root 13098205 12月 20 16:21 linux-2.2.1.tar.gz
lrwxrwxrwx 2 root root 14 2005-09-07 linux-2.4 -> linux-2.4.20-8
drwxr-xr-x 16 root root 4096 3月 17 11:02 linux-2.4.20-8
drwxr-xr-x 7 root root 4096 2005-09-07 redhat
难道是什么地方有问题吗?
还有这个问题说是:
At first, make sure that the link "/lib/modules/`you_kernel_version`/build"
points to the source code for your currently running kernel.
我看了下:
[root@mb scsi_tgt]# cd /lib/modules
[root@mb modules]# ls
2.4.20-8 2.4.20-8custom
[root@mb modules]# 2.4.20-8
-bash: 2.4.20-8: command not found
[root@mb modules]# cd 2.4.20-8
[root@mb 2.4.20-8]# ls
build misc modules.generic_string modules.isapnpmap modules.pcimap modules.usbmap
kernel modules.dep modules.ieee1394map modules.parportmap modules.pnpbiosmap
[root@mb 2.4.20-8]# cat build
cat: build: 是一个目录
[root@mb 2.4.20-8]# ls -l
总用量 340
lrwxrwxrwx 1 root root 31 2005-09-07 build -> ../../../usr/src/linux-2.4.20-8
drwxr-xr-x 8 root root 4096 2005-09-07 kernel
drwxr-xr-x 2 root root 4096 2005-09-09 misc
-rw-r--r-- 1 root root 96372 3月 14 10:43 modules.dep
-rw-r--r-- 1 root root 31 3月 14 10:43 modules.generic_string
-rw-r--r-- 1 root root 147 3月 14 10:43 modules.ieee1394map
-rw-r--r-- 1 root root 8257 3月 14 10:43 modules.isapnpmap
-rw-r--r-- 1 root root 29 3月 14 10:43 modules.parportmap
-rw-r--r-- 1 root root 77029 3月 14 10:43 modules.pcimap
-rw-r--r-- 1 root root 24 3月 14 10:43 modules.pnpbiosmap
-rw-r--r-- 1 root root 121825 3月 14 10:43 modules.usbmap
[root@mb 2.4.20-8]# cd ..
[root@mb modules]# ls
2.4.20-8 2.4.20-8custom
[root@mb modules]# cd 2.4.20-8custom/
[root@mb 2.4.20-8custom]# ls
build modules.dep modules.ieee1394map modules.parportmap modules.pnpbiosmap pcmcia
kernel modules.generic_string modules.isapnpmap modules.pcimap modules.usbmap
[root@mb 2.4.20-8custom]# ls -l
总用量 196
lrwxrwxrwx 1 root root 23 3月 14 10:39 build -> /usr/src/linux-2.4.20-8
drwxr-xr-x 9 root root 4096 3月 14 10:39 kernel
-rw-r--r-- 1 root root 84845 3月 14 10:39 modules.dep
-rw-r--r-- 1 root root 31 3月 14 10:39 modules.generic_string
-rw-r--r-- 1 root root 147 3月 14 10:39 modules.ieee1394map
-rw-r--r-- 1 root root 2490 3月 14 10:39 modules.isapnpmap
-rw-r--r-- 1 root root 29 3月 14 10:39 modules.parportmap
-rw-r--r-- 1 root root 71051 3月 14 10:39 modules.pcimap
-rw-r--r-- 1 root root 24 3月 14 10:39 modules.pnpbiosmap
-rw-r--r-- 1 root root 189 3月 14 10:39 modules.usbmap
drwxr-xr-x 2 root root 4096 3月 14 10:39 pcmcia
请大家看看到底怎么回事,如果第二个有问题的怎么操作,谢谢了!
scsi_tgt.o: kernel-module version mismatch
scsi_tgt.o was compiled for kernel version 2.4.20-8custom
while this kernel is version 2.4.20-8.
[root@mb src]# uname -a
Linux mb.hustraid 2.4.20-8 #1 Thu Mar 13 17:54:28 EST 2003 i686 i686 i386 GNU/Linux
我是在version 2.4.20-8下编译的scsi_tgt.o模块啊,可是加载的时候却报错,怎么回事啊,我最后看了下usr/src下的文件如下:
[root@mb src]# ls -l
总用量 12828
drwxr-xr-x 2 root root 4096 2003-01-25 debug
drwxr-xr-x 15 1046 1046 4096 3月 17 11:00 linux
-r-x------ 1 root root 13098205 12月 20 16:21 linux-2.2.1.tar.gz
lrwxrwxrwx 2 root root 14 2005-09-07 linux-2.4 -> linux-2.4.20-8
drwxr-xr-x 16 root root 4096 3月 17 11:02 linux-2.4.20-8
drwxr-xr-x 7 root root 4096 2005-09-07 redhat
难道是什么地方有问题吗?
还有这个问题说是:
At first, make sure that the link "/lib/modules/`you_kernel_version`/build"
points to the source code for your currently running kernel.
我看了下:
[root@mb scsi_tgt]# cd /lib/modules
[root@mb modules]# ls
2.4.20-8 2.4.20-8custom
[root@mb modules]# 2.4.20-8
-bash: 2.4.20-8: command not found
[root@mb modules]# cd 2.4.20-8
[root@mb 2.4.20-8]# ls
build misc modules.generic_string modules.isapnpmap modules.pcimap modules.usbmap
kernel modules.dep modules.ieee1394map modules.parportmap modules.pnpbiosmap
[root@mb 2.4.20-8]# cat build
cat: build: 是一个目录
[root@mb 2.4.20-8]# ls -l
总用量 340
lrwxrwxrwx 1 root root 31 2005-09-07 build -> ../../../usr/src/linux-2.4.20-8
drwxr-xr-x 8 root root 4096 2005-09-07 kernel
drwxr-xr-x 2 root root 4096 2005-09-09 misc
-rw-r--r-- 1 root root 96372 3月 14 10:43 modules.dep
-rw-r--r-- 1 root root 31 3月 14 10:43 modules.generic_string
-rw-r--r-- 1 root root 147 3月 14 10:43 modules.ieee1394map
-rw-r--r-- 1 root root 8257 3月 14 10:43 modules.isapnpmap
-rw-r--r-- 1 root root 29 3月 14 10:43 modules.parportmap
-rw-r--r-- 1 root root 77029 3月 14 10:43 modules.pcimap
-rw-r--r-- 1 root root 24 3月 14 10:43 modules.pnpbiosmap
-rw-r--r-- 1 root root 121825 3月 14 10:43 modules.usbmap
[root@mb 2.4.20-8]# cd ..
[root@mb modules]# ls
2.4.20-8 2.4.20-8custom
[root@mb modules]# cd 2.4.20-8custom/
[root@mb 2.4.20-8custom]# ls
build modules.dep modules.ieee1394map modules.parportmap modules.pnpbiosmap pcmcia
kernel modules.generic_string modules.isapnpmap modules.pcimap modules.usbmap
[root@mb 2.4.20-8custom]# ls -l
总用量 196
lrwxrwxrwx 1 root root 23 3月 14 10:39 build -> /usr/src/linux-2.4.20-8
drwxr-xr-x 9 root root 4096 3月 14 10:39 kernel
-rw-r--r-- 1 root root 84845 3月 14 10:39 modules.dep
-rw-r--r-- 1 root root 31 3月 14 10:39 modules.generic_string
-rw-r--r-- 1 root root 147 3月 14 10:39 modules.ieee1394map
-rw-r--r-- 1 root root 2490 3月 14 10:39 modules.isapnpmap
-rw-r--r-- 1 root root 29 3月 14 10:39 modules.parportmap
-rw-r--r-- 1 root root 71051 3月 14 10:39 modules.pcimap
-rw-r--r-- 1 root root 24 3月 14 10:39 modules.pnpbiosmap
-rw-r--r-- 1 root root 189 3月 14 10:39 modules.usbmap
drwxr-xr-x 2 root root 4096 3月 14 10:39 pcmcia
请大家看看到底怎么回事,如果第二个有问题的怎么操作,谢谢了!
作者: hust_mb 发布时间: 2006-03-17
看起来是你的系统上有两个内核,那个叫2.4.20-8custom的是你自己编译的,2.4.20-8是系统自带的;
你当前系统启动的是系统自带的内核,也就是2.4.20-8;
而你编译scsi_tgt.o模块时使用的是2.4.20-8custom提供的那些头文件
所以在简单的方法就是重起到2.4.20-8custom内核;或者重新编你的scsi_tgt.o模块,编译的时候用 -I 指定头文件包含路径
你当前系统启动的是系统自带的内核,也就是2.4.20-8;
而你编译scsi_tgt.o模块时使用的是2.4.20-8custom提供的那些头文件
所以在简单的方法就是重起到2.4.20-8custom内核;或者重新编你的scsi_tgt.o模块,编译的时候用 -I 指定头文件包含路径
作者: xieweiyi 发布时间: 2006-03-18
那为什么我运行在2.4.20-8的内核里面,然后编译的时候为什么那些头文件调用的是2.4.20-8custom提供的那些头文件呢?
作者: hust_mb 发布时间: 2006-03-21
请看linux1.0核心游记,模块编写的那一章,有解决这个问题的办法
作者: gotop2004 发布时间: 2006-03-22
2.4 内核不值得看
除非是公司需要
早晚要转2.6,那时候很多东西还要重新学
除非是公司需要
早晚要转2.6,那时候很多东西还要重新学
作者: zhllg 发布时间: 2006-03-23
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28