Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 04-05-2004, 05:24 AM   #1
LQ Newbie
Registered: Feb 2004
Posts: 1

Rep: Reputation: 0
Angry Can't load module :error kernel version mismatch

I am a newbie device writer thus from ' Linux Device Writers' I took the first code

#define MODULE
#include <linux/module.h>

int init_module(void) { printk("<1>Hello, world\n"); return 0;}
void cleanup_module(void) {printk("<1>Good bye cruel world\n");}

compiled it with gcc(storing this as test.c) and then ran the command: insmod ./test.o

but instead of Hello,world I got the following message:

insmod ./test.o
./test.o: kernel-module version mismatch
./test.o was compiled for kernel version 2.4.20
while this kernel is version 2.4.20-8

System:AMD Athlon 1800+,128MB ,etc

i don't want to use -f option. Rubini suggests to compile own kernel without version support,
but how do i do it.

thank you

Last edited by garv; 04-05-2004 at 05:26 AM.
Old 04-05-2004, 01:47 PM   #2
Registered: Mar 2004
Location: US
Distribution: Redhat 9 - Linux 2.6.3
Posts: 836

Rep: Reputation: 31
cd to /usr/src/linux-2.4.20-8

type make menuconfig

in the kernel options it will say
loadable module support blah blah.

enable module informnation on all modules. set this to no.

Otherwise get the right kernel sources and when compiling specify those sources.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel-module Version Mismatch !!! lionking_x Linux - Networking 1 02-02-2004 03:07 PM
Kernel-module Version Mismatch !!! lionking_x Linux - Software 1 02-02-2004 03:06 PM
Kernel-module Version Mismatch !!! lionking_x Linux - Newbie 1 02-02-2004 02:01 PM
kernel-module version mismatch louai Linux - General 2 01-08-2004 12:22 PM
Module won't load due to Kernel version mismatch salukibob Programming 0 03-31-2001 02:50 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:35 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration