+ -
当前位置:首页 → 问答吧 → 内核insmod格式无效问题

内核insmod格式无效问题

时间:2010-10-24

来源:互联网

[root@local ~]# insmod hello-1.ko
insmod: error inserting 'hello-1.ko': -1 Invalid module format
/var/log/messages
[root@local log]# cat messages
Oct 24 11:26:16 local syslogd 1.4.1: restart.
Oct 24 11:26:51 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 11:27:00 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 11:30:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 11:30:10 local kernel: IPCG: ttl over num:0
Oct 24 11:33:26 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 11:40:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 11:40:10 local kernel: IPCG: ttl over num:0
Oct 24 11:42:36 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 11:44:53 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 11:50:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 11:50:10 local kernel: IPCG: ttl over num:0
Oct 24 11:55:24 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 12:00:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 12:00:10 local kernel: IPCG: ttl over num:0
Oct 24 12:00:26 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 12:10:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 12:10:10 local kernel: IPCG: ttl over num:0
Oct 24 12:10:20 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 12:11:58 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 12:20:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 12:20:10 local kernel: IPCG: ttl over num:0
Oct 24 12:30:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 12:30:10 local kernel: IPCG: ttl over num:0
Oct 24 12:40:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 12:40:10 local kernel: IPCG: ttl over num:0
Oct 24 12:50:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 12:50:10 local kernel: IPCG: ttl over num:0
Oct 24 13:00:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 13:00:10 local kernel: IPCG: ttl over num:0
Oct 24 13:03:56 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 13:04:35 local last message repeated 2 times
Oct 24 13:04:46 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 13:10:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 13:10:10 local kernel: IPCG: ttl over num:0
Oct 24 13:20:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 13:20:10 local kernel: IPCG: ttl over num:0
Oct 24 13:30:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 13:30:10 local kernel: IPCG: ttl over num:0
Oct 24 13:33:31 local system-config-network[7374]: -+ //etc/modprobe.conf      e th0 alias tg3
Oct 24 13:33:31 local system-config-network[7374]: chmod 0644 //etc/sysconfig/ne tworking/devices/ifcfg-eth0
Oct 24 13:33:31 local system-config-network[7374]: chmod 0644 //etc/sysconfig/ne tworking/devices/ifcfg-eth0:1
Oct 24 13:40:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 13:40:10 local kernel: IPCG: ttl over num:0
Oct 24 13:40:16 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 13:50:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 13:50:10 local kernel: IPCG: ttl over num:0
Oct 24 13:52:13 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 14:00:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 14:00:10 local kernel: IPCG: ttl over num:0
Oct 24 14:10:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 14:10:10 local kernel: IPCG: ttl over num:0
Oct 24 14:20:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 14:20:10 local kernel: IPCG: ttl over num:0
Oct 24 14:30:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 14:30:10 local kernel: IPCG: ttl over num:0
Oct 24 14:32:07 local firefox-bin: gethostby*.getanswer: asked for "csdnimg.cn I N AAAA", got type "SOA"
Oct 24 14:35:15 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 14:39:00 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 14:40:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 14:40:10 local kernel: IPCG: ttl over num:0
Oct 24 14:43:58 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 14:48:44 local last message repeated 2 times
Oct 24 14:49:12 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 14:50:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 14:50:10 local kernel: IPCG: ttl over num:0
Oct 24 14:58:14 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 15:00:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 15:00:10 local kernel: IPCG: ttl over num:0
Oct 24 15:07:25 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 15:08:05 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 15:10:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 15:10:10 local kernel: IPCG: ttl over num:0
Oct 24 15:10:27 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 15:14:25 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 15:15:49 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 15:15:55 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 15:20:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 15:20:10 local kernel: IPCG: ttl over num:0
Oct 24 15:22:47 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 15:26:26 local last message repeated 2 times
Oct 24 15:27:50 local last message repeated 4 times
Oct 24 15:30:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 15:30:10 local kernel: IPCG: ttl over num:0
Oct 24 15:30:32 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 15:35:52 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 15:37:16 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 15:40:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 15:40:10 local kernel: IPCG: ttl over num:0
Oct 24 15:41:57 local firefox-bin: gethostby*.getanswer: asked for "erst.cn IN A AAA", got type "SOA"
Oct 24 15:45:29 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 15:50:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 15:50:10 local kernel: IPCG: ttl over num:0
Oct 24 16:00:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 16:00:10 local kernel: IPCG: ttl over num:0
Oct 24 16:10:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 16:10:10 local kernel: IPCG: ttl over num:0
Oct 24 16:20:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 16:20:10 local kernel: IPCG: ttl over num:0
Oct 24 16:30:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 16:30:10 local kernel: IPCG: ttl over num:0
Oct 24 16:40:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 16:40:10 local kernel: IPCG: ttl over num:0
Oct 24 16:50:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 16:50:10 local kernel: IPCG: ttl over num:0
Oct 24 17:00:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 17:00:10 local kernel: IPCG: ttl over num:0
Oct 24 17:10:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 17:10:10 local kernel: IPCG: ttl over num:0
Oct 24 17:20:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 17:20:10 local kernel: IPCG: ttl over num:0
Oct 24 17:30:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 17:30:10 local kernel: IPCG: ttl over num:0
Oct 24 17:39:08 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 17:39:08 local kernel: IPCG: ttl over num:0
Oct 24 17:41:27 local system-config-network[10270]: -+ //etc/modprobe.conf     e th0 alias tg3
Oct 24 17:41:27 local system-config-network[10270]: chmod 0644 //etc/sysconfig/n etworking/devices/ifcfg-eth0
Oct 24 17:41:27 local system-config-network[10270]: chmod 0644 //etc/sysconfig/n etworking/devices/ifcfg-eth0:1
Oct 24 17:45:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 17:45:10 local kernel: IPCG: ttl over num:0
Oct 24 17:53:51 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 17:55:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 17:55:10 local kernel: IPCG: ttl over num:0
Oct 24 18:05:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 18:05:10 local kernel: IPCG: ttl over num:0
Oct 24 18:15:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 18:15:10 local kernel: IPCG: ttl over num:0
Oct 24 18:24:35 local kernel: hello_1: disagrees about version of symbol struct_ module
Oct 24 18:25:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 18:25:10 local kernel: IPCG: ttl over num:0
Oct 24 18:31:02 local kernel: hello_1: disagrees about version of symbol struct_ module
Oct 24 18:35:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 18:35:10 local kernel: IPCG: ttl over num:0
Oct 24 18:36:47 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 18:40:42 local kernel: hello_1: disagrees about version of symbol struct_ module
Oct 24 18:40:57 local kernel: hello_1: disagrees about version of symbol struct_ module
Oct 24 18:44:38 local kernel: No module found in object
Oct 24 18:45:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 18:45:10 local kernel: IPCG: ttl over num:0
Oct 24 18:47:36 local firefox-bin: gethostby*.getanswer: asked for "csdnimg.cn I N AAAA", got type "SOA"
Oct 24 18:51:47 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 18:51:53 local kernel: No module found in object
Oct 24 18:52:01 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 18:54:26 local kernel: hello_1: disagrees about version of symbol struct_ module
Oct 24 18:55:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 18:55:10 local kernel: IPCG: ttl over num:0
Oct 24 19:00:00 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 19:01:43 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 19:02:57 local kernel: hello_1: disagrees about version of symbol struct_ module
Oct 24 19:05:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 19:05:10 local kernel: IPCG: ttl over num:0
Oct 24 19:15:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 19:15:10 local kernel: IPCG: ttl over num:0
Oct 24 19:16:40 local firefox-bin: gethostby*.getanswer: asked for "csdnimg.cn I N AAAA", got type "SOA"
Oct 24 19:20:34 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 19:20:41 local last message repeated 2 times
Oct 24 19:25:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 19:25:10 local kernel: IPCG: ttl over num:0
Oct 24 19:29:05 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 19:32:59 local kernel: hello_1: disagrees about version of symbol struct_ module
Oct 24 19:35:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 19:35:10 local kernel: IPCG: ttl over num:0
Oct 24 19:45:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 19:45:10 local kernel: IPCG: ttl over num:0
Oct 24 19:48:53 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 19:55:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 19:55:10 local kernel: IPCG: ttl over num:0
Oct 24 19:56:49 local kernel: hello_1: disagrees about version of symbol struct_ module
Oct 24 20:05:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 20:05:10 local kernel: IPCG: ttl over num:0
Oct 24 20:10:48 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 20:11:59 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 20:11:59 local kernel: IPCG: ttl over num:0
Oct 24 20:12:39 local htt_server[3841]: Client shut down the connection owned by  im_id(1).
Oct 24 20:19:48 local kernel: hello_1: disagrees about version of symbol struct_ module
Oct 24 20:20:10 local kernel: IPCG: [Accounting]No linkinfo in this time!
Oct 24 20:20:10 local kernel: IPCG: ttl over num:0

然后网上找的解决方法是

modprobe -f  --froce-modversion
[root@local ~]# modprobe -f  --froce-modversion
modprobe: unrecognized option `--froce-modversion'
Usage: modprobe [-v] [-V] [-C config-file] [-n] [-i] [-q] [-o <modname>] <modname> [parameters...]
modprobe -r [-n] [-i] [-v] <modulename> ...
modprobe -l -t <dirname> [ -a <modulename> ...]
[root@local ~]#
这个命令没法执行.而且显示的modprobe里边没有 -f 命令
怎么解决啊?
初次编译添加内核模块


大虾们出除招啊


........................................................

作者: zanglengyu   发布时间: 2010-10-24

版本问题。编译时用的内核版本和安装时的不一样。把2个弄一样就可以了。。。。

作者: accessory   发布时间: 2010-10-24