linux/module.h No such file or Directory

Peppe Cook picture Peppe Cook · Jun 4, 2013 · Viewed 20.5k times · Source

For my thesis I am creating a Manet using the protocol ARAN. To install the protocol I'm using this manual, but the first step, the creation of trace_route, I received errors such as:

-linux/module.h: No such file or directory

-linux/procs_Fs: No such file or directory

-linux/skbuff: No such file or directory

I searched the web and found out that the problem is in the headers, but I do not find the solution ...

P.S. I am using Ubuntu 10.04 LTS Kernel 2.6.33 recompiled

Answer

Vilhelm Gray picture Vilhelm Gray · Jun 4, 2013

You're missing the Linux kernel headers which allow you to compile code against the Linux kernel.

To install just the headers in Ubuntu:

$ sudo apt-get install linux-headers-$(uname -r)

To install the entire Linux kernel source in Ubuntu:

$ sudo apt-get install linux-source

Note that you should use the kernel headers that match the kernel you are running.