linux安装8125B网卡驱动

机器的系统是CentOS7,网卡是Realtek的2.5G网卡RTL8125B。

1. 下载驱动

Realtek 瑞昱官网:https://www.realtek.com/zh/
下载链接:https://www.realtek.com/zh/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software
选择 2.5G Ethernet LINUX driver r8125 for kernel up to 5.19这个包下载。

2. 安装驱动

解压后执行自动安装脚本。但是报错,显示如下:

SSL error:02001002:system library:fopen:No such file or directory: ../crypto/bio/bss_file.c:72
SSL error:2006D080:BIO routines:BIO_new_file:no such file: ../crypto/bio/bss_file.c:79

modprobe: ERROR: could not insert 'r8125': Exec format error> 

解决方法是在终端执行下列命令,直接复制即可

cd /lib/modules/$(uname -r)/build/certs

sudo tee x509.genkey > /dev/null << 'EOF'
[ req ]
default_bits = 4096
distinguished_name = req_distinguished_name
prompt = no
string_mask = utf8only
x509_extensions = myexts
[ req_distinguished_name ]
CN = Modules
[ myexts ]
basicConstraints=critical,CA:FALSE
keyUsage=digitalSignature
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid
EOF

sudo openssl req -new -nodes -utf8 -sha512 -days 36500 -batch -x509 -config x509.genkey -outform DER -out signing_key.x509 -keyout signing_key.pem

之后再使用自动安装脚本就能正常执行了。
最后使用ifconfig查看发现已经有了网卡。

参考链接:https://blog.csdn.net/chen20170325/article/details/127692547

posted @ 2023-02-23 17:10  lbz007  阅读(2407)  评论(0编辑  收藏  举报
Live2D