How to install a wifi antenna in OSMC (module compile)

Hi All,
I want to install a wifi antenna on Rpi-4 running osmc.

The model is a Raspberry Pi 4 Model B Rev 1.5 (4GB).
The antenna, according to lsusb:
Bus 001 Device 003: ID 0bda:a811 Realtek Semiconductor Corp. RTL8811AU 802.11a/b/g/n/ac WLAN Adapter

I have made a fresh manual install using OSMC_TGT_rbp4_20230124.img.gz.

The install was completed by:
apt update; apt full-upgrade
apt install git bc usbutils build-utils rbp464-headers-sanitised-5.15.92-1-osmc

The kernel running is now (uname -a):
Linux osmc4 5.15.92-1-osmc #1 SMP PREEMPT Tue Jul 25 00:03:42 UTC 2023 aarch64 GNU/Linux

I followed the instructions on (

Step 8 gave me a problem I cannot resolve - please help:

root@osmc4:~/src/8821au-20210708# ./
Your kernel header files aren’t properly installed.
Please consult your distro documentation or user support forums.
Once the header files are properly installed, please run “sudo ./”

Any ideas how to have kernel header files properly installed?

You might take a look at this thread…

Thank you for the quick response! But …
I am already using the headers-sanitized- package.
Using make in place of the script immediately gives me an error:

root@osmc4:~/src/8821au-20210708# make
make ARCH=arm64 CROSS_COMPILE= -C /lib/modules/5.15.92-1-osmc/build M=/root/src/8821au-20210708 modules
make[1]: *** /lib/modules/5.15.92-1-osmc/build: Datei oder Verzeichnis nicht gefunden. Schluss.
make: *** [Makefile:2501: modules] Fehler 2

No progress so far. Am I missing a build-related package?

I don’t know the German error. Could you export LANG=C?

Sorry - excuse my laziness.
Here is the same in English:

root@osmc4:~/src/8821au-20210708# make
make ARCH=arm64 CROSS_COMPILE= -C /lib/modules/5.15.92-1-osmc/build M=/root/src/8821au-20210708 modules
make[1]: *** /lib/modules/5.15.92-1-osmc/build: No such file or directory. Stop.
make: *** [Makefile:2501: modules] Error 2


For starters I would make sure you are using an Aarch64 tool chain.

Thank you, Sam.
I was having ideas to that end - in the area of software building I am just not smart enough to know what I should do exactly.
Can you tell me which packages would fall under ‘tool chain’? Would ‘libc…’ be part of it?
Do I need to uninstall the armhf packages of the same name?

sudo apt-get install aarch64-toolchain-osmc


Thank you for the hint - I missed this when looking for packages.
So even with the toolchain installed there is no directory ‘/lib/modules/5.15.92-1-osmc/build’ which
the build process apparently expects.
The error when calling make is literally the same as above.
I have installed:

root@osmc4:~/src/8821au-20210708# apt install rbp464-source-5.15.92-1-osmc
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 130 MB of archives.
After this operation, 1116 MB of additional disk space will be used.
Get:1 bullseye/main arm64 rbp464-source-5.15.92-1-osmc arm64 5.15.92-1-osmc [130 MB]
Fetched 130 MB in 18s (7328 kB/s)                                                                                                                                                                                                                                            
Selecting previously unselected package rbp464-source-5.15.92-1-osmc:arm64.
(Reading database ... 61035 files and directories currently installed.)
Preparing to unpack .../rbp464-source-5.15.92-1-osmc_5.15.92-1-osmc_arm64.deb ...
Unpacking rbp464-source-5.15.92-1-osmc:arm64 (5.15.92-1-osmc) ...
Setting up rbp464-source-5.15.92-1-osmc:arm64 (5.15.92-1-osmc) ...

Still no build directory. The kernel source package only has


I noticed that the Makefile addresses different architectures.
Supposedly arm64 is the correct one.

No idea how to continue from here.