捣鼓几天终于把ubuntu系统给装上了,悲催的是,居然没有无线网卡驱动,哎!说多了都是泪阿,经过几天的捣鼓终于搞定了!特分享给大家
系统安装完成后,虽然没有无线网卡,但是有蓝牙驱动,我就连手机的蓝牙,通过蓝牙上的网。
安装前,记得先更新ubuntu系统的源,这样可能下载gcc等软件快一点,更新源的链接如下:
https://www.linuxidc.com/Linux/2017-11/148627.htm
后在网上查到了解决办法,跟着下面这篇文字操作,就正常安装了驱动,链接如下:
https://www.jianshu.com/p/90ff6c10f64e
事情并没有到此结束,无线网用了几天后,有一天重启后,无线网卡居然消失了,哎!!!!
安照 https://www.jianshu.com/p/90ff6c10f64e 又操作了一遍,居然报错了,如下:
kdd@KddPad:~/rtl8821ce$ make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.0.0-23-generic/build M=/home/kdd/rtl8821ce modules
make[1]: 进入目录“/usr/src/linux-headers-5.0.0-23-generic”
CC [M] /home/kdd/rtl8821ce/os_dep/linux/os_intfs.o
In file included from /home/kdd/rtl8821ce/include/drv_types.h:35:0,
from /home/kdd/rtl8821ce/os_dep/linux/os_intfs.c:22:
/home/kdd/rtl8821ce/include/wifi.h:1019:0: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40
In file included from /home/kdd/rtl8821ce/include/osdep_service_linux.h:86:0,
from /home/kdd/rtl8821ce/include/osdep_service.h:48,
from /home/kdd/rtl8821ce/include/drv_types.h:32,
from /home/kdd/rtl8821ce/os_dep/linux/os_intfs.c:22:
./include/linux/ieee80211.h:1444:0: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100
/home/kdd/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/kdd/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:284: recipe for target '/home/kdd/rtl8821ce/os_dep/linux/os_intfs.o' failed
make[2]: *** [/home/kdd/rtl8821ce/os_dep/linux/os_intfs.o] Error 1
Makefile:1606: recipe for target '_module_/home/kdd/rtl8821ce' failed
make[1]: *** [_module_/home/kdd/rtl8821ce] Error 2
make[1]: 离开目录“/usr/src/linux-headers-5.0.0-23-generic”
Makefile:1902: recipe for target 'modules' failed
make: *** [modules] Error 2
査了半天错误,猜着大概就是linux的内核版本太高了,编译不通过,可以看下这个文章:
https://forum.ubuntu.org.cn/viewtopic.php?p=3213887 帮助下理解
我也是根据这篇文章的启发,才结局问题的。
好,解决问题
1、到 https://github.com/tomaspinho/rtl8821ce 这里下载驱动包
2、驱动包解压,进入到解压后的文件夹
3、在文件夹中打开黑窗口 输入 make
完成后输入 sudo make install
完成后输入 sudo modprobe -a 8821ce
执行完即可,我的linux的版本是:5.0.0-23-generic
uname -r 用来查看内核版本的指令