Kernel Header Mismatch Issue on Raspberry Pi

252 views Asked by At

I am experiencing an issue with a kernel header mismatch on my Raspberry Pi device running Debian GNU/Linux 11 (bullseye). The system is currently operating with kernel version 5.13.19-v8+, however, the available headers appear to be for version 5.10.0-23. This mismatch is causing an error during the execution of the build_install.bash script in my project. I need assistance in obtaining the correct kernel header for my current kernel version.

This is what I am trying to do now:


arthi@raspberrypi:~/Desktop/RaspberryPiMouse/utils $ ./build_install.bash
build_install_header_from_apt_raspi2.bash
===================
ERROR: No kernel header files found.
If you need someone's support, you should share this information.
Linux raspberrypi 5.13.19-v8+ #1 SMP PREEMPT Sat Jul 1 12:27:00 BST 2023 aarch64 GNU/Linux
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye
/usr/src/linux-headers-5.10.0-23-arm64:
arch  include  Makefile  Module.symvers  scripts  tools

/usr/src/linux-headers-5.10.0-23-common:
arch  include  Makefile  scripts  tools

/usr/src/linux-headers-6.1.21-v8+:
arch   crypto         fs       io_uring  kernel    mm              rust     security  usr
block  Documentation  include  ipc       lib       Module.symvers  samples  sound     virt
certs  drivers        init     Kconfig   Makefile  net             scripts  tools

/usr/src/linux-kbuild-5.10:
scripts  tools
===================
arthi@raspberrypi:~/Desktop/RaspberryPiMouse/utils $ uname -r
5.13.19-v8+
arthi@raspberrypi:~/Desktop/RaspberryPiMouse/utils $ apt-cache search linux-headers
raspberrypi-kernel-headers - Header files for the Raspberry Pi Linux kernel
linux-headers-5.10.0-23-arm64 - Header files for Linux 5.10.0-23-arm64
linux-headers-5.10.0-23-common - Common header files for Linux 5.10.0-23
linux-headers-arm64 - Header files for Linux arm64 configuration (meta-package)
arthi@raspberrypi:~/Desktop/RaspberryPiMouse/utils $

It appears that I'm running kernel version 5.13.19-v8+, but my available headers seem to be for version 5.10.0-23. This seems to be causing the error.

My hypothesis is that Debian might not be providing the correct kernel headers, and when installing the headers from the Raspberry Pi repository, it seems to fetch the latest ones available, which doesn't align with my current kernel version.

How can I obtain the correct kernel header for my current kernel version (5.13.19-v8+)?

0

There are 0 answers