今天突然無法有線網絡無法連接任何設備,并且圖標都沒了
錯誤案例
往上一頓搜索,試了很多博客都不行,比如
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.
圖標回來了!!!!!!!!!