Dkms fails to find kernel-headers on raspberry pi

I’m trying to install anbox on the raspberry pi 3. For that I installed a fresh version of manjaro (64bit) on a SD card. This is my current kernel version:

$ echo $(uname -a)
Linux long-rasp 5.10.73-2-MANJARO-ARM #1 SMP PREEMPT Fri Oct 15 17:56:08 UTC 2021 aarch64 GNU/Linux

When I follow the instruction to compile the kernel modules for anbox on and get the step of running dkms, I get the following error:

$ sudo dkms install anbox-ashmem/1
Error! Your kernel headers for kernel 5.10.73-2-MANJARO-ARM cannot be found at /usr/lib/modules/5.10.73-2-MANJARO-ARM/build or /usr/lib/modules/5.10.73-2-MANJARO-ARM/source.
You can use the --kernelsourcedir option to tell DKMS where it's located.

I tried to specify the folder /usr/lib/modules/5…/build/include with the --kernelsourcedir flag but it printed the same error. Anyone has an idea?

Thank for any help!

Install linux-rpi4-headers.

And make sure you are completely up to date.

I already have.

$ pacman -Ss linux-rpi4-header
core/linux-rpi4-headers 5.10.76-2 [installed]
    Header files and scripts for building modules for linux kernel - Raspberry Pi 4 64-bit kernel
$ sudo pacman -Su
:: Starting full system upgrade...
 there is nothing to do

edit: after rebooting it, it’s stuck at the boot now. I will copy the manjaro image again and start all over. maybe that fixes it.

Headers and kernel version does not match.

Update your system and reboot.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.