Error installing usb wifi driver rtl8821cu-dkms-git from AUR

I am trying to set up my usb wifi dongle, which is listed as

Bus 001 Device 008: ID 0bda:c811 Realtek Semiconductor Corp. 802.11ac NIC

So I figured the right driver for me is

rtl8821cu-dkms-git

however I get errors when installing:

(2/3) Install DKMS modules
==> ERROR: Missing run kernel headers for module rtl8821cu/5.4.1141ef3ff12.
==> ERROR: Missing lost+found kernel headers for module rtl8821cu/5.4.1141ef3ff12.
==> ERROR: Missing lib64 kernel headers for module rtl8821cu/5.4.1141ef3ff12.
==> ERROR: Missing bin kernel headers for module rtl8821cu/5.4.1141ef3ff12.
==> ERROR: Missing lib kernel headers for module rtl8821cu/5.4.1141ef3ff12.
==> ERROR: Missing var kernel headers for module rtl8821cu/5.4.1141ef3ff12.
==> ERROR: Missing home kernel headers for module rtl8821cu/5.4.1141ef3ff12.
==> ERROR: Missing proc kernel headers for module rtl8821cu/5.4.1141ef3ff12.
==> ERROR: Missing opt kernel headers for module rtl8821cu/5.4.1141ef3ff12.
==> ERROR: Missing etc kernel headers for module rtl8821cu/5.4.1141ef3ff12.
==> ERROR: Missing mnt kernel headers for module rtl8821cu/5.4.1141ef3ff12.
==> ERROR: Missing root kernel headers for module rtl8821cu/5.4.1141ef3ff12.
==> ERROR: Missing sys kernel headers for module rtl8821cu/5.4.1141ef3ff12.
==> ERROR: Missing sbin kernel headers for module rtl8821cu/5.4.1141ef3ff12.
==> ERROR: Missing tmp kernel headers for module rtl8821cu/5.4.1141ef3ff12.
==> ERROR: Missing usr kernel headers for module rtl8821cu/5.4.1141ef3ff12.
==> ERROR: Missing srv kernel headers for module rtl8821cu/5.4.1141ef3ff12.
==> ERROR: Missing rootfs-pkgs.txt kernel headers for module rtl8821cu/5.4.1141ef3ff12.
==> ERROR: Missing dev kernel headers for module rtl8821cu/5.4.1141ef3ff12.
==> ERROR: Missing desktopfs-pkgs.txt kernel headers for module rtl8821cu/5.4.1141ef3ff12.
==> ERROR: Missing boot kernel headers for module rtl8821cu/5.4.1141ef3ff12.
(3/3) Refreshing PackageKit...

my system info:

inxi -F                                         ✔ 
System:
  Host: shmuel-manjaro Kernel: 5.16.7-1-MANJARO x86_64
    bits: 64 Desktop: KDE Plasma 5.23.5 Distro: Manjaro Linux
Machine:
  Type: Desktop Mobo: ASUSTeK model: PRIME B365M-A
    v: Rev X.0x serial: <superuser required>
    UEFI: American Megatrends v: 1203 date: 10/10/2019
CPU:
  Info: 8-core model: Intel Core i7-9700 bits: 64 type: MCP
    cache: L2: 2 MiB
  Speed (MHz): avg: 800 min/max: 800/4700 cores: 1: 800
    2: 800 3: 800 4: 800 5: 800 6: 800 7: 800 8: 800
Graphics:
  Device-1: Intel CoffeeLake-S GT2 [UHD Graphics 630]
    driver: i915 v: kernel
  Device-2: Microdia USB Live camera type: USB
    driver: snd-usb-audio,uvcvideo
  Display: x11 server: X.Org 1.21.1.3 driver:
    loaded: modesetting resolution: 1: 1920x1080~120Hz
    2: 1920x1080~60Hz
  OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2)
    v: 4.6 Mesa 21.3.5
Audio:
  Device-1: Intel 200 Series PCH HD Audio
    driver: snd_hda_intel
  Device-2: Microdia USB Live camera type: USB
    driver: snd-usb-audio,uvcvideo
  Sound Server-1: ALSA v: k5.16.7-1-MANJARO running: yes
  Sound Server-2: PulseAudio v: 15.0 running: yes
  Sound Server-3: PipeWire v: 0.3.45 running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit
  Ethernet
    driver: r8169
  IF: enp3s0 state: up speed: 1000 Mbps duplex: full
    mac: a8:5e:45:e2:87:3c
  Device-2: Realtek 802.11ac NIC type: USB driver: N/A
Bluetooth:
  Device-1: Cambridge Silicon Radio Bluetooth Dongle (HCI
  mode)
    type: USB driver: btusb
  Report: rfkill ID: hci0 state: up
    address: see --recommends
Drives:
  Local Storage: total: 2.26 TiB used: 702.3 GiB (30.4%)
  ID-1: /dev/sda vendor: Kingston model: SA400S37480G
    size: 447.13 GiB
  ID-2: /dev/sdb vendor: Toshiba model: HDWD120
    size: 1.82 TiB
Partition:
  ID-1: / size: 66.76 GiB used: 25.54 GiB (38.3%) fs: ext4
    dev: /dev/sda8
  ID-2: /boot/efi size: 96 MiB used: 36.9 MiB (38.5%)
    fs: vfat dev: /dev/sda2
Swap:
  Alert: No swap data was found.
Sensors:
  System Temperatures: cpu: 29.8 C mobo: 27.8 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 274 Uptime: 1h 49m Memory: 15.49 GiB
  used: 8.93 GiB (57.6%) Shell: Zsh inxi: 3.3.12

So now after a careful look at the errors, it seems like this driver wants to find a 5.4 kernel, but I have a later one.
Is that the problem, and if so, do I need to downgrade my kernel in order to use the driver?

Hi @shmu26,

To install almost anything, if not anything, from the AUR, you would need all the installed kernels’ headers. In Manjaro, you can have more than one kernel installed. To find out which are installed, open a terminal and run:

mhwd-kernel --listinstalled

Provide the output here, please.


Tip:

To provide terminal output, copy the text you wish to share, and paste it here, surrounded by three (3) backticks, a.k.a grave accents. Like this:

```
pasted text
```

This will just cause it to be rendered like this:

Portaest sed
elementum
cursus nisl nisi
hendrerit ac quis
sit
adipiscing
tortor sit leo commodo.

Instead off like this:

Portaest sed elementum cursus nisl nisi hendrerit ac quis sit adipiscing tortor sit leo commodo.

Thereby improving legibility and making it much easier for those trying to be of assistance.

You will have to install first the linux-headers for your running kernel. The following command will install the linux-headers automatically for all installed kernels:

sudo pacman -S $(pacman -Qsq "^linux" | grep "^linux[0-9]*[-rt]*$" | awk '{print $1"-headers"}' ORS=' ')
1 Like

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