ubuntu22.04有线网络无法连接,图标也没了
今天突然无法有线网络无法连接任何设备,并且图标都没了
错误案例
往上一顿搜索,试了很多博客都不行,比如
Ubuntu22.04右上角网络图标消失
最后解决的办法
下载网卡驱动,重新安装
操作步骤
查看自己网卡的型号
lspci | grep net
输出:
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
可以看到我的网卡是RTL8125,那么就下载他的驱动。
不得不说realtek这个SB网站做的真SB,找了半天都没找到在哪下载,搜索框跟摆设一样
最后还是让我给找到了
下载好后解压,
其实readme里面有写,执行
sudo ./autorun.sh
输出:
Check old driver and unload it.
rmmod r8169
Build the module and install
warning: the compiler differs from the one used to build the kernelThe kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0You are using: gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
Skipping BTF generation for /home/lcjpc/Downloads/r8125-9.016.00/src/r8125.ko due to unavailability of vmlinux
Warning: modules_install: missing 'System.map' file. Skipping depmod.
Backup r8169.ko
rename r8169.ko to r8169.bak
DEPMOD 6.8.0-60-generic
load module r8125
Updating initramfs. Please wait.
update-initramfs: Generating /boot/initrd.img-6.8.0-60-generic
Completed.
图标回来了!!!!!!!!!