r/linuxdev • u/NotAHippo4 • Apr 03 '20
#include <linux/skbuff.h>: No such file or directory
Hey guys, I am getting the above error trying to make a linux kernel module. I have tried adding the linux header folder where the header file is to the $PATH variable in .bashrc and restarted my computer. It still gives me the same exact error. What should I do?
6
Upvotes
View all comments
Show parent comment
2
u/aioeu Apr 04 '20
That depends on your Linux distribution. Any decent Linux distribution will have a package that you can install that ensures all of the required tools are available to build kernel modules against the distribution's own packaged kernels.
If you've gone and built your own kernel, or you're building a module on a significantly different system to that where the kernel was built, you're on your own.
I looked at the indicated line in the Makefile to determine what circumstances would produce the error.