我在 Google 上搜索了这个问题,得到了几个链接,其中一个是 [如何让 Realtek RTL8723BE 无线网卡工作?但在按照这个方法操作时,我在运行
sudo apt-get install rtlwifi-new-dkms
**Error message is**
Error! Bad return status for module build on kernel: 4.15.0-47-generic
(x86_64) Consult /var/lib/dkms/rtlwifi-new/0.10/build/make.log for
more information.
我无法对同一篇文章发表评论,所以在这里提问。
DKMS make.log for rtlwifi-new-0.10 for kernel 4.15.0-47-generic (x86_64)
Sat Apr 20 13:00:43 IST 2019
make: Entering directory '/usr/src/linux-headers-4.15.0-47-generic'
Makefile:976: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
CC [M] /var/lib/dkms/rtlwifi-new/0.10/build/base.o
In file included from /var/lib/dkms/rtlwifi-new/0.10/build/base.c:30:0:
/var/lib/dkms/rtlwifi-new/0.10/build/wifi.h:1327:40: error: ‘IEEE80211_NUM_BANDS’ undeclared here (not in a function)
struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS];
^
/var/lib/dkms/rtlwifi-new/0.10/build/base.c:138:10: error: ‘IEEE80211_BAND_2GHZ’ undeclared here (not in a function)
.band = IEEE80211_BAND_2GHZ,
^
/var/lib/dkms/rtlwifi-new/0.10/build/base.c:150:10: error: ‘IEEE80211_BAND_5GHZ’ undeclared here (not in a function)
.band = IEEE80211_BAND_5GHZ,
^
/var/lib/dkms/rtlwifi-new/0.10/build/base.c: In function ‘_rtl_init_deferred_work’:
/var/lib/dkms/rtlwifi-new/0.10/build/base.c:517:2: error: implicit declaration of function ‘init_timer’ [-Werror=implicit-function-declaration]
init_timer(&rtlpriv->works.watchdog_timer);
^
/var/lib/dkms/rtlwifi-new/0.10/build/base.c:518:2: error: implicit declaration of function ‘setup_timer’ [-Werror=implicit-function-declaration]
setup_timer(&rtlpriv->works.watchdog_timer,
^
cc1: some warnings being treated as errors
scripts/Makefile.build:332: recipe for target '/var/lib/dkms/rtlwifi-new/0.10/build/base.o' failed
make[1]: *** [/var/lib/dkms/rtlwifi-new/0.10/build/base.o] Error 1
Makefile:1552: recipe for target '_module_/var/lib/dkms/rtlwifi-new/0.10/build' failed
make: *** [_module_/var/lib/dkms/rtlwifi-new/0.10/build] Error 2
make: Leaving directory '/usr/src/linux-headers-4.15.0-47-generic'
以上是 /var/lib/dkms/rtlwifi-new/0.10/build/make.log 的日志
以下是通过以下脚本收集的无线信息的链接
wget -N -t 5 -T 10 https://github.com/UbuntuForums/wireless-info/raw/master/wireless-info && \chmod +x wireless-info && \./wireless-info