LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-12-2015, 12:42 PM   #1
sunita
LQ Newbie
 
Registered: Dec 2010
Posts: 18

Rep: Reputation: 0
cannot find module.h


fatal error: linux/module.h: No such file or directory
#include <linux/modulbuild.h> /
^
compilation terminated.

I also updated the kernel apt-get update
and
build essential linux headers

But it does not work
 
Old 10-12-2015, 02:49 PM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,654

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
You need the kernel sources to get that - there are many files of that name in different locations.

What are you trying to do?
 
Old 10-12-2015, 09:24 PM   #3
sunita
LQ Newbie
 
Registered: Dec 2010
Posts: 18

Original Poster
Rep: Reputation: 0
I am trying to compile the linux kerenl with simple hello world program. But it reports an error.
 
Old 10-12-2015, 09:55 PM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,654

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
Unless you are trying to make it a module/driver... you don't need the kernel source.

And most distributions have necessary kernel headers for creating a kernel module without needing to recompile the entire kernel - they are not installed by default.
 
Old 10-13-2015, 05:34 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
Re #3, @sunita.
Quote:
I am trying to compile the linux kernel with simple hello world program
Many of the "hello world program`s" you can find are ancient.
I.e. for a very old kernel.
So unless your "hello world" was written yesterday, it may fail.


Quote:
#include <linux/modulbuild.h> /
modulbuild.h is an unknown file.
No file by name modulbuild.h or modulebuild.h ever existed.


-
 
  


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
cpan2tgz error on installing module: Failed to find module: build_requires pwc101 Slackware 6 01-08-2009 06:24 AM
cant find module path shariefbe Linux - Newbie 8 10-02-2008 03:02 AM
Cannot find module WRSpithead Slackware 2 11-14-2005 12:01 AM
Where can I find wish (tk module)? pjz Programming 6 03-11-2004 09:52 AM
Can't find module 3c509.o.gz jailles Linux - Networking 2 11-15-2003 08:46 AM


All times are GMT -5. The time now is 08:44 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration