I installed Ubuntu 22.04 to a new laptop (hp probook 455 g9) and couldn't connect to wifi. Setting says "no adapter found". I found the problem answered here Network Driver for Realtek 10ec:b852, however I'm having issues with the steps in the accepted answer under that post.
In terminal I wrote:
sudo apt update
sudo apt install git bc
git clone https://github.com/HRex39/rtl8852be.git
cd rtl8852be
make
and after that last step, i received:
/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
Could you please tell me, what's the issue, and how do I make the wifi work? Thank you for your time.
Edit1: thank you, I was able to continue with make and sudo make install, but having rebooted, the wifi is still not working. In the linked post, there's another instruction to run sudo modprobe 8852be, but I receive this response:
modprobe: ERROR: could not insert '8852be': Operation not permitted