rtl8812au icon indicating copy to clipboard operation
rtl8812au copied to clipboard

/lib/modules/4.14.50-v7+/build: No such file or directory.

Open AddaxSoft opened this issue 6 years ago • 11 comments

Trying to build this driver on RaspberryPi Model B kernel: 4.14.50-v7+

lsusb: Bus 001 Device 005: ID 0bda:8812 Realtek Semiconductor Corp. RTL8812AU 802.11a/b/g/n/ac WLAN Adapter

error:

make ARCH=arm CROSS_COMPILE= -C /lib/modules/4.14.50-v7+/build M=/tmp/rtl8812au  modules
make[1]: *** /lib/modules/4.14.50-v7+/build: No such file or directory.  Stop.
Makefile:1052: recipe for target 'modules' failed
make: *** [modules] Error 2

AddaxSoft avatar Jun 21 '18 10:06 AddaxSoft

The makefile cannot find the kernel headers to compile the kernel module. Try running sudo apt-get install raspberrypi-kernel-headers to install them.

h17-cs avatar Jul 08 '18 01:07 h17-cs

Headers are out of sync with the kernel. I had the same issue, my headers were out of date so i had to checkout and build a kernel.

matthewpapa07 avatar May 02 '19 18:05 matthewpapa07

The makefile cannot find the kernel headers to compile the kernel module. Try running sudo apt-get install raspberrypi-kernel-headers to install them.

I have the same probleme on my raspberry pi 4 and I have try to execute this : sudo apt-get install raspberrypi-kernel-headers before execute sudo ./install.sh but the problem still there:

make[1]: *** /lib/modules/4.19.75-v7l+/build : Aucun fichier ou dossier de ce type. Arrêt. (in french)

He you got an idea ?

Emile-Bergin avatar Feb 26 '20 20:02 Emile-Bergin

sudo apt-get update && sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel sudo apt-get install raspberrypi-kernel-headers reboot

zoldaten avatar May 25 '20 17:05 zoldaten

This can happen if you haven't run apt upgrade for a bit, but installed raspberrypi-kernel-headers recently. In this case, the version of headers that gets installed is newer than the currently running kernel, and the build fails. The solution is to either install raspberrypi-kernel-headers for your currently running kernel, or to upgrade the kernel and reboot to match the headers.

pandasauce avatar Jun 08 '20 12:06 pandasauce

Brand new images via the imager_1.6.2. Same issue.

With @zoldaten 's way, I could get it running.

the0bone avatar Nov 24 '21 09:11 the0bone

I have updated apt-get and installed raspberry-kernel-headers, but there is still no "build".....

TranWhite avatar Jan 02 '22 10:01 TranWhite

A similar problem was encountered in Kali

Moxin1044 avatar Mar 23 '22 03:03 Moxin1044

Same on 5.15.34-v7+

marriusco avatar Apr 22 '22 15:04 marriusco

When I installed an industrial camera SDK on the Raspberry Pi, I needed to run a program in run format and ended up showing that there was a problem: Check kernel header file ..........NG ERROR:The kernel header(/lib/modules/4.19.75-v7l+/build ) correspoding to the kernelversion is missing. so how to solve this problem?

Leewis052 avatar May 09 '22 07:05 Leewis052

i was having this same problem, this is what i did to fix it: after running the suggested above command sudo apt-get install raspberrypi-kernel-headers

i found my headers in /usr/src so i copied them to my build folder, but first i had to make one sudo mkdir /lib/modules/5.10.103-v7+/build/ then copied the headers into that new build folder sudo cp -r /usr/src/linux-headers-5.10.103-v7+/* /lib/modules/5.10.103-v7+/build/

now when i run my makefile, my drivers compile without the above error message

davidtooley avatar May 14 '22 07:05 davidtooley