Kernel header files

Hi, I’m trying to build a driver that requires kernel header files…

The driver’s Makefile expects header files in the /lib/modules/$(shell uname -r)/build/ directory, however there’s no build/ directory in the /usr/lib/modules/5.10.60-v8+

Suggested sudo apt install -y linux-headers-$(uname -r) says it’s unable to locate package linux-headers-5.10.60-v8
(I’ve done apt update, prior to that).

As a side note, I’m noticing that the apt install command ignores the ‘+’ sign at the end of the kernel version. I’ve tried explicitly specifying the kernel version with a quotes around it, but it still seems to ignore it…

My question is where can I find (or download) the build directory for the 5.10.60-v8+ kernel header files?

On Raspberry Pi, kernel and headers packages have a little uncommon names:

apt install raspberrypi-kernel-headers

Purge any other kernel and headers you have installed. Those are not used by the RPi.