root@kali:~/桌面# cd rtlwifi_new/
root@kali:~/桌面/rtlwifi_new# ls
base.c cam.c core.c debug.h firmware pci.h rc.c regd.c rtl8192c rtl8192de rtl8723ae stats.c usb.h
base.h cam.h core.h efuse.c Makefile ps.c rc.h regd.h rtl8192ce rtl8192ee rtl8723be stats.h wifi.h
btcoexist compat.h debug.c efuse.h pci.c ps.h README.md rtl8188ee rtl8192cu rtl8192se rtl8821ae usb.c
root@kali:~/桌面/rtlwifi_new# make
make -C /lib/modules/4.0.0-kali1-amd64/build M=/root/桌面/rtlwifi_new modules
make[1]: *** /lib/modules/4.0.0-kali1-amd64/build: 没有那个文件或目录。 停止。
Makefile:35: recipe for target 'all' failed
make: *** [all] Error 2
root@kali:~/桌面/rtlwifi_new# apt-get install linux-headers-$(uname -r)
++++++++++++++++++++++++++++++++++++++++++++++++++
https://github.com/mtorromeo/r8168 download r8168-8.040.master.zip
problem: 无法定位软件包 linux-headers- kali1-amd64
resolve:
https://forums.kali.org/showthread.php?5804-Kernel-headers-problem/page5
For Kali 2.0, I had the same issue, but it was due to the sources.list not including the http.kali.org entries from a vanilla install using the amd64 ISO. Add these into there and you should be able to locate the package correctly afterwards.
root@debian:~/桌面/r8168-master# gedit /etc/apt/sources.list
#-------------------------------------------------begin
# Regular Repositories
deb http://http.kali.org/kali sana main non-free contrib
deb http://security.kali.org/kali-security sana/updates main contrib non-free
# Source Repositories
deb-src http://http.kali.org/kali sana main non-free contrib
deb-src http://security.kali.org/kali-security sana/updates main contrib non-free
#-------------------------------------------------end
Then, you can update and install linux-headers:
root@debian:~/桌面/r8168-master# apt-get update
root@debian:~/桌面/r8168-master# apt-get install linux-headers-$(uname -r)