我无法在TP-Link WN821N的Kali Linux 5.2上构建RTL8192EU驱动程序。在make
中运行cd rtl8192eu-linux-driver
(从https://github.com/jeremyb31/rtl8192eu-linux-driver下载)后:
# sudo apt update
Hit:1 http://kali.download/kali kali-rolling InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
511 packages can be upgraded. Run 'apt list --upgradable' to see them.
# git clone https://github.com/jeremyb31/rtl8192eu-linux-driver
fatal: destination path 'rtl8192eu-linux-driver' already exists and is not an empty directory.
# cd rtl8192eu-linux-driver
# make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.2.0-kali2-amd64/build M=/root/rtl8192eu-linux-driver modules
make[1]: Entering directory '/usr/src/linux-headers-5.2.0-kali2-amd64'
CC [M] /root/rtl8192eu-linux-driver/os_dep/osdep_service.o
In file included from /root/rtl8192eu-linux-driver/include/drv_types.h:35,
from /root/rtl8192eu-linux-driver/os_dep/osdep_service.c:24:
/root/rtl8192eu-linux-driver/include/wifi.h:1019: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40
In file included from /root/rtl8192eu-linux-driver/include/osdep_service_linux.h:84,
from /root/rtl8192eu-linux-driver/include/osdep_service.h:45,
from /root/rtl8192eu-linux-driver/include/drv_types.h:32,
from /root/rtl8192eu-linux-driver/os_dep/osdep_service.c:24:
/usr/src/linux-headers-5.2.0-kali2-common/include/linux/ieee80211.h:1441: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100
/root/rtl8192eu-linux-driver/os_dep/osdep_service.c: In function ‘isFileReadable’:
/root/rtl8192eu-linux-driver/os_dep/osdep_service.c:1970:28: error: implicit declaration of function ‘get_ds’; did you mean ‘get_da’? [-Werror=implicit-function-declaration]
oldfs = get_fs(); set_fs(get_ds());
^~~~~~
get_da
/root/rtl8192eu-linux-driver/os_dep/osdep_service.c:1970:28: error: incompatible type for argument 1 of ‘set_fs’
oldfs = get_fs(); set_fs(get_ds());
^~~~~~~~
In file included from /usr/src/linux-headers-5.2.0-kali2-common/include/linux/uaccess.h:11,
from /usr/src/linux-headers-5.2.0-kali2-common/include/linux/crypto.h:21,
from /usr/src/linux-headers-5.2.0-kali2-common/include/crypto/hash.h:11,
from /usr/src/linux-headers-5.2.0-kali2-common/include/linux/uio.h:10,
from /usr/src/linux-headers-5.2.0-kali2-common/include/linux/socket.h:8,
from /usr/src/linux-headers-5.2.0-kali2-common/include/linux/compat.h:15,
from /usr/src/linux-headers-5.2.0-kali2-common/include/linux/ethtool.h:17,
from /usr/src/linux-headers-5.2.0-kali2-common/include/linux/netdevice.h:37,
from /root/rtl8192eu-linux-driver/include/osdep_service_linux.h:35,
from /root/rtl8192eu-linux-driver/include/osdep_service.h:45,
from /root/rtl8192eu-linux-driver/include/drv_types.h:32,
from /root/rtl8192eu-linux-driver/os_dep/osdep_service.c:24:
/usr/src/linux-headers-5.2.0-kali2-common/arch/x86/include/asm/uaccess.h:29:40: note: expected ‘mm_segment_t’ {aka ‘struct <anonymous>’} but argument is of type ‘int’
static inline void set_fs(mm_segment_t fs)
~~~~~~~~~~~~~^~
/root/rtl8192eu-linux-driver/os_dep/osdep_service.c: In function ‘retriveFromFile’:
/root/rtl8192eu-linux-driver/os_dep/osdep_service.c:1998:29: error: incompatible type for argument 1 of ‘set_fs’
oldfs = get_fs(); set_fs(get_ds());
^~~~~~~~
In file included from /usr/src/linux-headers-5.2.0-kali2-common/include/linux/uaccess.h:11,
from /usr/src/linux-headers-5.2.0-kali2-common/include/linux/crypto.h:21,
from /usr/src/linux-headers-5.2.0-kali2-common/include/crypto/hash.h:11,
from /usr/src/linux-headers-5.2.0-kali2-common/include/linux/uio.h:10,
from /usr/src/linux-headers-5.2.0-kali2-common/include/linux/socket.h:8,
from /usr/src/linux-headers-5.2.0-kali2-common/include/linux/compat.h:15,
from /usr/src/linux-headers-5.2.0-kali2-common/include/linux/ethtool.h:17,
from /usr/src/linux-headers-5.2.0-kali2-common/include/linux/netdevice.h:37,
from /root/rtl8192eu-linux-driver/include/osdep_service_linux.h:35,
from /root/rtl8192eu-linux-driver/include/osdep_service.h:45,
from /root/rtl8192eu-linux-driver/include/drv_types.h:32,
from /root/rtl8192eu-linux-driver/os_dep/osdep_service.c:24:
/usr/src/linux-headers-5.2.0-kali2-common/arch/x86/include/asm/uaccess.h:29:40: note: expected ‘mm_segment_t’ {aka ‘struct <anonymous>’} but argument is of type ‘int’
static inline void set_fs(mm_segment_t fs)
~~~~~~~~~~~~~^~
/root/rtl8192eu-linux-driver/os_dep/osdep_service.c: In function ‘storeToFile’:
/root/rtl8192eu-linux-driver/os_dep/osdep_service.c:2032:29: error: incompatible type for argument 1 of ‘set_fs’
oldfs = get_fs(); set_fs(get_ds());
^~~~~~~~
In file included from /usr/src/linux-headers-5.2.0-kali2-common/include/linux/uaccess.h:11,
from /usr/src/linux-headers-5.2.0-kali2-common/include/linux/crypto.h:21,
from /usr/src/linux-headers-5.2.0-kali2-common/include/crypto/hash.h:11,
from /usr/src/linux-headers-5.2.0-kali2-common/include/linux/uio.h:10,
from /usr/src/linux-headers-5.2.0-kali2-common/include/linux/socket.h:8,
from /usr/src/linux-headers-5.2.0-kali2-common/include/linux/compat.h:15,
from /usr/src/linux-headers-5.2.0-kali2-common/include/linux/ethtool.h:17,
from /usr/src/linux-headers-5.2.0-kali2-common/include/linux/netdevice.h:37,
from /root/rtl8192eu-linux-driver/include/osdep_service_linux.h:35,
from /root/rtl8192eu-linux-driver/include/osdep_service.h:45,
from /root/rtl8192eu-linux-driver/include/drv_types.h:32,
from /root/rtl8192eu-linux-driver/os_dep/osdep_service.c:24:
/usr/src/linux-headers-5.2.0-kali2-common/arch/x86/include/asm/uaccess.h:29:40: note: expected ‘mm_segment_t’ {aka ‘struct <anonymous>’} but argument is of type ‘int’
static inline void set_fs(mm_segment_t fs)
~~~~~~~~~~~~~^~
cc1: some warnings being treated as errors
make[4]: *** [/usr/src/linux-headers-5.2.0-kali2-common/scripts/Makefile.build:284: /root/rtl8192eu-linux-driver/os_dep/osdep_service.o] Error 1
make[3]: *** [/usr/src/linux-headers-5.2.0-kali2-common/Makefile:1610: _module_/root/rtl8192eu-linux-driver] Error 2
make[2]: *** [Makefile:179: sub-make] Error 2
make[1]: *** [Makefile:8: all] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.2.0-kali2-amd64'
make: *** [Makefile:1700: modules] Error 2
如何解决编译错误?
答案 0 :(得分:0)
转到mange:
下载并安装唯一可用的驱动程序。它对我来说是默认驱动程序,但“电源”极低且连接丢失/连接不良。现在它可以正常运行了,就像应该的那样。
我只是一个简单/新的Linux用户,所以我无法提供任何进一步的支持。但是提到的站点有详细的说明。我被推荐到那里,但还有其他多个论坛。