ebpfkit-monitor
ebpfkit-monitor copied to clipboard
Question about the error when running make command
Hi, I encountered this error when I am running the make command
I'm suspecting its because kconfig.h does not exist at /lib/modules like what was stated in the system requirements
But, I'm not really sure how I can resolve this issue as I'm a new Linux user, I've checked that the linux-headers is installed and the kconfig.h exists at /usr/src/linux-headers-4.19.0-20-common/include/linux. Anyone has any idea how I can resolve this issue? Thanks in advance.
Hey @flairekq 👋🏻
Can you paste the output of uname -r
please ? (I'm wondering if your running kernel is out of sync with the headers you downloaded)
Other idea: have you tried removing all the build
in the MakeFile here:
[...]
-I/lib/modules/$$(uname -r)/build/include \
-I/lib/modules/$$(uname -r)/build/include/uapi \
-I/lib/modules/$$(uname -r)/build/include/generated/uapi \
-I/lib/modules/$$(uname -r)/build/arch/x86/include \
-I/lib/modules/$$(uname -r)/build/arch/x86/include/uapi \
-I/lib/modules/$$(uname -r)/build/arch/x86/include/generated \
[...]
Thanks !
Hey @flairekq , Can you paste the output of
uname -r
please ? (I'm wondering if your running kernel is out of sync with the headers you downloaded) Thanks !
Hi!
Ho yeah, so you're definitely out of sync 🎉 Your running kernel is 5.10 and the headers you pointed to are from a 4.19 kernel. Can you install the headers of your kernel ? (probably something like sudo apt install linux-headers-$(uname -r)
)
Then, if your headers are installed somewhere else than /lib/modules/
then make sure to update the Makefile
accordingly :)
Ho yeah, so you're definitely out of sync 🎉 Your running kernel is 5.10 and the headers you pointed to are from a 4.19 kernel. Can you install the headers of your kernel ? (probably something like
sudo apt install linux-headers-$(uname -r)
)
Oh wait omg im sorry i forgot that 4.19 kernel is on another laptop. The current one is this:
Btw, I tried removing all the build in the MakeFile but it still has the same error.
Ok so once you have your headers somewhere, update the Makefile
to point to them :)
So if I'm not mistaken it should look like this:
[...]
-I/usr/src/linux-headers-$$(uname -r)/build/include \
-I/usr/src/linux-headers-$$(uname -r)/build/include/uapi \
-I/usr/src/linux-headers-$$(uname -r)/build/include/generated/uapi \
-I/usr/src/linux-headers-$$(uname -r)/build/arch/x86/include \
-I/usr/src/linux-headers-$$(uname -r)/build/arch/x86/include/uapi \
-I/usr/src/linux-headers-$$(uname -r)/build/arch/x86/include/generated \
[...]
Instead of this:
[...]
-I/lib/modules/$$(uname -r)/build/include \
-I/lib/modules/$$(uname -r)/build/include/uapi \
-I/lib/modules/$$(uname -r)/build/include/generated/uapi \
-I/lib/modules/$$(uname -r)/build/arch/x86/include \
-I/lib/modules/$$(uname -r)/build/arch/x86/include/uapi \
-I/lib/modules/$$(uname -r)/build/arch/x86/include/generated \
[...]
Hmm, still has the same error
Hmm, still has the same error
Can you check where your kernel headers are?
For me including "-I/usr/src/linux-hwe-5.15-headers-5.15.0-73/include " in the make file worked.