我在一台新笔记本电脑(hp probook 455 g9)上安装了 Ubuntu 22.04,但无法连接到 wifi。设置显示“未找到适配器”。我在这里找到了问题的答案Realtek 10ec:b852 的网络驱动程序,但是我对该帖子下接受的答案中的步骤有疑问。
在终端我写道:
sudo apt update
sudo apt install git bc
git clone https://github.com/HRex39/rtl8852be.git
cd rtl8852be
make
完成最后一步后,我收到了:
/bin/sh: 1: cc: not found
(standard_in) 1: syntax error
#rm -f .symvers.8852be
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.15.0-56-generic/build M=/home/kone/rtl8852be modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.0-56-generic'
arch/x86/Makefile:142: CONFIG_X86_X32 enabled but no binutils support
make[1]: gcc: No such file or directory
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
You are using:
/bin/sh: 1: gcc: not found
(standard_in) 1: syntax error
CC [M] /home/kone/rtl8852be/platform/platform_linux_pc_pci.o
/bin/sh: 1: gcc: not found
make[2]: *** [scripts/Makefile.build:297: /home/kone/rtl8852be/platform/platform_linux_pc_pci.o] Error 127
make[1]: *** [Makefile:1903: /home/kone/rtl8852be] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-56-generic'
make: *** [Makefile:637: modules] Error 2
您能告诉我问题出在哪里吗?我该如何让 wifi 正常工作?谢谢您的宝贵时间。
编辑 1:谢谢,我可以继续使用make
和sudo make install
,但重新启动后,wifi 仍然无法正常工作。在链接的帖子中,还有另一条运行 的指令sudo modprobe 8852be
,但我收到了以下回复:
modprobe: ERROR: could not insert '8852be': Operation not permitted
答案1
您需要安装build-essential
。
跑步
sudo apt install build-essential
并重试make
命令。