LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 01-06-2008, 03:17 PM   #1
eerpini
Member
 
Registered: Mar 2007
Posts: 36

Rep: Reputation: 15
cannot find linux/module.h


i am using a fedora 8 distribution , when i tried to write a sample module and compile it for loading it dynamically into the kernel , it gave an error saying that there is no header as such : <linux/module.h>
i could not find the reason , .......
i have installed all the required RPMS , the list of kernel related RPMS installed are :

kernel-debug-2.6.23.1-42.fc8
kernel-2.6.23.1-42.fc8
kernel-headers-2.6.23.1-42.fc8
kernel-PAE-2.6.23.1-42.fc8
kernel-xen-devel-2.6.21-2950.fc8
kernel-PAE-devel-2.6.23.1-42.fc8
kernel-debug-devel-2.6.23.1-42.fc8
kernel-xen-2.6.21-2950.fc8


but i am still not able to get the header file /usr/include/linux/module.h .....
can anyone help me out ....?
 
Old 01-06-2008, 03:48 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,336

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
You may need a symbolic link. When Fedora 8 installs the header files or kernel source /usr/src/kernels they are usually installed with the version number included in the name. That way you can have more than one version's source installed at the same time. The compile typically looks for a header file or source file with a general name so you need a symbolic link from the general name to the release specific name. For example if you have linux source installed as /usr/src/kernels/linux-2.6.23.1-42.fc8 then you need a symbolic link like:

ln -s /usr/src/kernels/linux-2.6.23.1-42.fc8 /usr/src/linux

so that the compiler can find the correct version of the linux source. I am not sure that I have the symbolic link described correctly for Fedora but it will be similar to what I posted.

---------------------------
Steve Stites

Last edited by jailbait; 01-06-2008 at 03:50 PM.
 
Old 01-06-2008, 04:50 PM   #3
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,716
Blog Entries: 3

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
Quote:
Originally Posted by jailbait View Post
You may need a symbolic link. When Fedora 8 installs the header files or kernel source /usr/src/kernels they are usually installed with the version number included in the name. That way you can have more than one version's source installed at the same time. The compile typically looks for a header file or source file with a general name so you need a symbolic link from the general name to the release specific name. For example if you have linux source installed as /usr/src/kernels/linux-2.6.23.1-42.fc8 then you need a symbolic link like:

ln -s /usr/src/kernels/linux-2.6.23.1-42.fc8 /usr/src/linux

so that the compiler can find the correct version of the linux source. I am not sure that I have the symbolic link described correctly for Fedora but it will be similar to what I posted.

---------------------------
Steve Stites
True but do not for get a lot of this is dont through /lib/module/uname -r/build
or /lib/modules/uname -r/source
I found on a couple distros even if the source was there the symbolic link to the source was not there. build is linked to headers or source and source is linked to source {uname -r.]
mine is /lib/modules/2.6.22.7/build
and also /lib/modules/2.6.22.7/ source
I always make sure both links are the for some scripts are one way only.
the header file you may be missing is from another program that is also need to fulfill the dependences.
 
Old 01-06-2008, 05:00 PM   #4
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,716
Blog Entries: 3

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
Quote:
Originally Posted by eerpini View Post
i am using a fedora 8 distribution , when i tried to write a sample module and compile it for loading it dynamically into the kernel , it gave an error saying that there is no header as such : <linux/module.h>
i could not find the reason , .......
i have installed all the required RPMS , the list of kernel related RPMS installed are :

kernel-debug-2.6.23.1-42.fc8
kernel-2.6.23.1-42.fc8
kernel-headers-2.6.23.1-42.fc8
kernel-PAE-2.6.23.1-42.fc8
kernel-xen-devel-2.6.21-2950.fc8
kernel-PAE-devel-2.6.23.1-42.fc8
kernel-debug-devel-2.6.23.1-42.fc8
kernel-xen-2.6.21-2950.fc8


but i am still not able to get the header file /usr/include/linux/module.h .....
can anyone help me out ....?
if you cant find the header file in /usr/include/linux that tells me you need to install a program that is missing the name of the header will tell you this program name. then what ever f8 is doing now days for a package manager try to find the program.
when we install programs the header files that are built go to the /usr/include/linux. and from what you told me you do have a /usr/include/linux
if you install the full source it uninstalls the pre built headers and installs the full source witch also becomes the /usr/include/ linux.
all about kernel flavor.
 
Old 07-02-2009, 11:44 AM   #5
dsouza
LQ Newbie
 
Registered: Jun 2006
Posts: 4

Rep: Reputation: 0
The one package that you seem to be missing is kernel-devel.
PD'S
 
  


Reply


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
cannot find linux/module.h eerpini Linux - General 1 01-06-2008 05:24 PM
Cannot find module WRSpithead Slackware 2 11-13-2005 11:01 PM
Where can I find wish (tk module)? pjz Programming 6 03-11-2004 08:52 AM
Can't find module 3c509.o.gz jailles Linux - Networking 2 11-15-2003 07:46 AM
modprobe: Can't find module mickeyboy Red Hat 1 09-13-2003 10:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 07:51 PM.

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