PDA

View Full Version : How do I install my internal wifi adapter driver on a lenovo thinkpad E570?



Johan297
2018-06-27, 14:19
Hi everyone,



I am trying to install the drivers for my internal wifi adapter (Realtek
Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network
Adapter)



I've downloaded the drivers but when I try to install with the command 'make' I get the following error: make

/bin/sh: 1: bc: not found

make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.16.0-kali2-amd64/build M=/rtl8821ce modules

make[1]: *** /lib/modules/4.16.0-kali2-amd64/build: No such file or directory. Stop.

Makefile:1902: recipe for target 'modules' failed

make: *** [modules] Error 2



Ps; I was able to install it on ubuntu 18.04LTS but I now switched to
Kali linux and now I get this error when I try to install the drivers.



Do any of you maybe have a solution for me or just can tell be what the error mean?




Kali version



Linux kali 4.16.0-kali2-amd64 #1 SMP Debian 4.16.12-1kali1 (2018-05-28) x86_64 GNU/Linux





I installed Kali linux on my hard drive.



iwconfig



eth0 no wireless extensions.

lo no wireless extensions.

usb0 no wireless extensions.







lspci



05:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter







make



make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.16.0-kali2-amd64/build M=/rtl8821ce modules
make[1]: *** /lib/modules/4.16.0-kali2-amd64/build: No such file or directory. Stop.
Makefile:1902: recipe for target 'modules' failed
make: *** [modules] Error 2

Mister_X
2018-06-27, 18:40
You should use "code" tags to display compilation messages and console outputs, it makes it easier to read.

In any case, "bc missing" is pretty much telling you to install bc. You can search using "apt-cache search bc" and it will tell you the package bc is what you're looking for. So, install it using "apt-get install bc" then run the compilation again.

Regarding the "no such file or directory" in the compilation, a google search would tell you that kernel headers are missing. However, it is better to install kernel sources. Package name should be the generic name, without version numbers (so that when the kernel updates, those are updated too).

Johan297
2018-06-27, 21:11
Thank you Mister_X for your reply. I apologize for the inconvenience I will use tags in the future.
I will try your solution and see if it works.
Kind regards

UPDATE:
Thank you Mister_X, I did as you suggested and installed "bc" and the kernel sources. But problem now occurred when I run the command "sudo make install", I get the following error "Makefile:822: /root/Downloads/rtl8821ce/rtl8821c.mk: No such file or directory
make: *** No rule to make target '/root/Downloads/rtl8821ce/rtl8821c.mk'. Stop."

The files that are in the driver folder "rtl8821ce" that I downloaded is: "8821ce.ko clean include Module.symvers runwpa
8821ce.mod.c core Kconfig os_dep wlan0dhcp
8821ce.mod.o hal Makefile platform
8821ce.o ifcfg-wlan0 modules.order rtl8821c.mk"

I did change the line in the Makefile from "export TopDIR ?= $(srctree)/drivers/net/wireless/rtl8821ce" to "export TopDIR ?= $ ~/Downloads/rtl8821ce" which is my current working directory and where the rtl8821ce folder is located

So I am not sure what this error means?

When I run the command "make" before "sudo make install" I get the following output: "make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.16.0-kali2-amd64/build M=/home/johan/Downloads/rtl8821ce modules
make[1]: Entering directory '/usr/src/linux-headers-4.16.0-kali2-amd64'
Building modules, stage 2.
MODPOST 1 modules
make[1]: Leaving directory '/usr/src/linux-headers-4.16.0-kali2-amd64' "