sudo apt install gcc make build-essential git linux-headers-$(uname -r)
.
.
.
Building for 5.19.0-37-generic
Building initial module for 5.19.0-37-generic
ERROR (dkms apport): kernel package linux-headers-5.19.0-37-generic is not supported
Error! Bad return status for module build on kernel: 5.19.0-37-generic (x86_64)
Consult /var/lib/dkms/rtl8822bu/5.8.7.1~ppa/build/make.log for more information.
dpkg: error processing package rtl8822bu-dkms (--configure):
installed rtl8822bu-dkms package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
r8723bu-dkms
rtl8822bu-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
即使尝试删除驱动程序包也会出现错误
Recommended:
sudo apt remove --purge r8723bu-dkms && sudo apt remove --purge rtl8822bu-dkms