Find the answer to your Linux question:
Results 1 to 6 of 6
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Unhappy couldn't find the kernel version the module was compiled for!


    I m new for this forum. wrote a hello.c kernel program while insmod hello.o, i am getting the message like "couldn't find the kernel version the module was compiled for".

    i didn't compile the kernel(2.4.20-, using already present with red hat linux.

    Please help me regarding this issue.

  2. #2
    Linux introduces with version 2.6 a new file naming convention, kernel modules now have a .ko extension instead of the old .o extension.

    insmod hello.ko

  3. #3
    Thanks for reply. but my kernel version is 2.4 and how to make .ko any option with gcc command or mv .o to .ko??

  4. $spacer_open
  5. #4
    I apologize, I didn't read the question well, you have to insmod the .o module in version 2.4.
    Did you compile the module with the source/headers that match your kernel version?
    Check the version number in /usr/src and compare it with the output of the command:
    uname -r

  6. #5
    I compile with below option, but i checked /lib/modules/ doesn't exist. is the ouput of uname -r.

    INCLUDE = -isystem /lib/modules/`uname -r`/build/include/
    in /usr/src nothing is there like, its the output of
    uname -r
    i didn't compile the kernel, using already existing.

  7. #6
    Do you have the kernel-headers/source installed? If not, try to Google for how to install the proper version for your distro.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts