error: couldn't find the kernel version the module was compiled for
resolve: #define __KERNEL__
#define MODULE
#include <linux/module.h>
#include <linux/kernel.h>
error: kernel-module version mismatch hello.o was compiled for kernel version 2.4.20 while this kernel version is 2.4.20-8
resolve :gcc -I/usr/src/linux-2.4.20-8/include -o hello.o -c hello.c
or change file /usr/include/linux/version.h 2.4.20 --> 2.4.20-8
or insmod -f hello.o
reason : gcc is search for include file in directory /usr/ include default