- 我已经在我的联想笔记本电脑上安装了 Ubuntu 18.04。
- 它没有显示 WiFi 选项。
- 我尝试下载驱动程序并按照此处所述的方式安装它们联想 ThinkPad E570(Realtek RTL8821CE)上的 Wi-Fi 无法使用.但没什么用。
每当我尝试使用
make
命令时,我都会得到/bin/sh: 1: cc: not found (standard_in) 1: syntax error make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.15.0-39-generic/build M=/home/bee/Downloads/rtl8821ce modules make[1]: Entering directory '/usr/src/linux-headers-4.15.0-39-generic' arch/x86/Makefile:156: CONFIG_X86_X32 enabled but no binutils support ./scripts/gcc-version.sh: line 26: gcc: command not found ./scripts/gcc-version.sh: line 27: gcc: command not found make[1]: gcc: Command not found Makefile:975: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel" /bin/sh: 1: gcc: not found (standard_in) 1: syntax error CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_cmd.o /bin/sh: 1: gcc: not found scripts/Makefile.build:332: recipe for target '/home/bee/Downloads/rtl8821ce/core/rtw_cmd.o' failed make[2]: *** [/home/bee/Downloads/rtl8821ce/core/rtw_cmd.o] Error 127 Makefile:1551: recipe for target '_module_/home/bee/Downloads/rtl8821ce' failed make[1]: *** [_module_/home/bee/Downloads/rtl8821ce] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-39-generic' Makefile:1902: recipe for target 'modules' failed make: *** [modules] Error 2
编辑1
安装 build-essential 后,错误问题仍然存在。
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.15.0-39-generic/build M=/home/bee/Downloads/rtl8821ce modules make[1]: Entering directory '/usr/src/linux-headers-4.15.0-39-generic' Makefile:975: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel" CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_cmd.o cc1: error: code model kernel does not support PIC mode scripts/Makefile.build:332: recipe for target '/home/bee/Downloads/rtl8821ce/core/rtw_cmd.o' failed make[2]: *** [/home/bee/Downloads/rtl8821ce/core/rtw_cmd.o] Error 1 Makefile:1551: recipe for target '_module_/home/bee/Downloads/rtl8821ce' failed make[1]: *** [_module_/home/bee/Downloads/rtl8821ce] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-39-generic' Makefile:1902: recipe for target 'modules' failed make: *** [modules] Error 2
编辑2
- 我已将内核升级到 4.18.6 并安装了libelf-dev
。再次输入make
命令时。它显示
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.18.6-041806-generic/build M=/home/bee/Downloads/rtl8821ce modules
make[1]: Entering directory '/usr/src/linux-headers-4.18.6-041806-generic'
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_cmd.o
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_security.o
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_debug.o
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_io.o
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_ioctl_query.o
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_ioctl_set.o
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_ieee80211.o
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_mlme.o
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_mlme_ext.o
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_mi.o
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_wlan_util.o
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_vht.o
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_pwrctrl.o
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_rf.o
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_recv.o
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_sta_mgt.o
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_ap.o
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_xmit.o
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_p2p.o
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_tdls.o
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_br_ext.o
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_iol.o
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_sreset.o
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_btcoex_wifionly.o
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_btcoex.o
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_beamforming.o
CC [M] /home/bee/Downloads/rtl8821ce/core/rtw_odm.o
CC [M] /home/bee/Downloads/rtl8821ce/core/efuse/rtw_efuse.o
CC [M] /home/bee/Downloads/rtl8821ce/os_dep/osdep_service.o
CC [M] /home/bee/Downloads/rtl8821ce/os_dep/linux/os_intfs.o
/home/bee/Downloads/rtl8821ce/os_dep/linux/os_intfs.c:1325:22: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.ndo_select_queue = rtw_select_queue,
^~~~~~~~~~~~~~~~
/home/bee/Downloads/rtl8821ce/os_dep/linux/os_intfs.c:1325:22: note: (near initialization for ‘rtw_netdev_ops.ndo_select_queue’)
cc1: some warnings being treated as errors
scripts/Makefile.build:317: recipe for target '/home/bee/Downloads/rtl8821ce/os_dep/linux/os_intfs.o' failed
make[2]: *** [/home/bee/Downloads/rtl8821ce/os_dep/linux/os_intfs.o] Error 1
Makefile:1504: recipe for target '_module_/home/bee/Downloads/rtl8821ce' failed
make[1]: *** [_module_/home/bee/Downloads/rtl8821ce] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.18.6-041806-generic'
Makefile:1902: recipe for target 'modules' failed
make: *** [modules] Error 2
答案1
您需要获取该build-essentials
包。使用命令
sudo apt install -y build-essential