2

我无法在 Kali Linux 5.2 上为 TP-Link WN821N 构建 RTL8192EU 驱动程序。运行makecd 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

如何修复编译错误?

4

1 回答 1

0

管理

下载并安装唯一有效的驱动程序。它适用于我的默认驱动程序,但“功率”极低且连接断开/不良。现在它工作得很好,就像它应该......

我只是一个简单/新的 linux 用户,所以我无法提供任何进一步的支持。但提到的网站有详细的说明。我被多个其他论坛推荐到那里。

于 2020-05-13T10:20:05.457 回答