I'm having problems installing Wifi Drivers rtl8821cu

After installing the latest release of Manjaro, I am having issues with installing my wifi drivers.

Here is the install script I used with the previous release which worked

sudo pacman -Syu
sudo pacman -S --noconfirm linux-headers dkms git bc
mkdir -p ~/src
cd ~/src
git clone GitHub - morrownr/8821cu-20210916: Linux Driver for USB WiFi Adapters that are based on the RTL8811CU, RTL8821CU, RTL8821CUH and RTL8731AU Chipsets - v5.12.0.4
cd ~/src/8821cu-20210916
sudo ./install-driver.sh

But now it tells me that my kernel headers need to be updated.

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 ./install-driver.sh”

Any help installing the drivers would be appreciated.

I think the problem here is you’re trying to install linux-headers but Manjaro doesn’t have that package like Arch.

You probably have to tell pacman which linux-headers to install, such as linux61-headers or for whichever kernels you have installed.

Thanks for the reply! I found the solution!

I ran that, and now I have the drivers installed.

sudo pacman -S $(ls /boot | awk -F “-” ‘/^linux/ { print $1"-headers" }’)

Hi @evropej, and welcome!

That driver is in the AUR:

$ pamac search 8821cu
rtl8821cu-dkms-git                                                                                                                                                                                                          AUR
rtl8821cu chipset driver

…and does not need to be installed like you’re attempting. However, it still does need the kernel headers installed first. So install them with:

pamac install $(pamac list --quiet --installed | grep "^linux[0-9]*[-rt]*$" | awk '{print $1"-headers"}' ORS=' ')

This will install the headers for all installed kernels.

Then you can install the driver from the AUR:

pamac build rtl8821cu-dkms-git

Hope this helps!

:bangbang: Tip: :bangbang:

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

Or three (3) tilde signs, like this:

pasted text

This will just cause it to be rendered like this:

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

Instead of like this:

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

Alternatively, paste the text you wish to format as terminal output, select all pasted text, and click the </> button on the taskbar. This will indent the whole pasted section with one TAB, causing it to render the same way as descrribed above.

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

Please edit your post accordingly.

For more information, please see:

:bangbang::bangbang: Additionally

If your language isn’t English, please prepend any and all terminal commands with LC_ALL=C. For example:

LC_ALL=C bluetoothctl

This will just cause the terminal output to be in English, making it easier to understand and debug.

Thank you, I will do that next time, I am a newbie as you can tell!

That is even better! Thank you!

1 Like

title edited as this has nothing to do with plasma, let alone 5.27 (which isn’t even available in the repos yet).

Yup, I downloaded the image today thinking for some reason it was 5.27 but after checking, it is not. Thanks