cilynx / rtl88x2bu

rtl88x2bu driver updated for current kernels.
http://www.wolfteck.com/2018/02/22/wsky_1200mbps_wireless_usb_wifi_adapter/
GNU General Public License v2.0
1.61k stars 316 forks source link

Your kernel headers for kernel 5.17.0-1020-oem cannot be found. #231

Closed lil-sussy closed 1 year ago

lil-sussy commented 1 year ago

Hi I am trying to install this driver on my machine but I encountered this error during dkms build and I don't know how to solve it. Thanks!

Error! Your kernel headers for kernel 5.17.0-1020-oem cannot be found. Please install the linux-headers-5.17.0-1020-oem package or use the --kernelsourcedir option to tell DKMS where it's located. nyasoftware@nyasoftware-System-Product-Name:~/

nye0 commented 1 year ago

I have the similar issue in raspberrypi. Here is my error message:

image
Your kernel headers for kernel 5.4.83-v7+ cannot be found at
/lib/modules/5.4.83-v7+/build or /lib/modules/5.4.83-v7+/source.

Just solved by

sudo dkms remove rtl88x2bu/${VER} --all
rm -rf /usr/src/rtl88x2bu-${VER}
sudo apt install --reinstall raspberrypi-kernel raspberrypi-kernel-headers

I think reason may because the kernel is not updated to the last one. ref

onlize commented 1 year ago

I have the following error message: pi@raspberrypi:~ $ ls rtl8812au pi@raspberrypi:~ $ sudo dkms remove rtl88x2bu/${VER} --all Error! Arguments and are not specified Usage: remove / or remove -m / or remove -m -v pi@raspberrypi:~ $ `

MaxG87 commented 1 year ago

Hi @onlize , have you set the ${VER} shell variable? Your snippet lets me suspect it is unset. In order to remove all driver modules, I use sudo dkms remove -m rtl88x2bu -v 5.8.7.1 --all, which works without any variables. Since the version virtually never changes, there is no need to keep the snippet flexible.

MaxG87 commented 1 year ago

While here, I need to add that the above mentioned trick does not work for me. I am on Raspbian, with Kernel 6.1.21-v8+ and albeit I ran sudo apt install --reinstall raspberrypi-kernel raspberrypi-kernel-headers I still cannot compile the driver module!