无法在 debian 上安装网络驱动程序 r8125

无法在 debian 上安装网络驱动程序 r8125

已解决,但目前我不允许将自己的答案标记为已接受的答案。

我买了一个新系统,想在上面安装 promox ve。不幸的是,安装过程无法获得网络连接。经过一番研究,我发现这是我的主板网卡的问题(稍后会详细介绍)。一种解决方案应该是安装 debian buster、网络驱动程序,并在网络连接正常时安装 proxmox ve。但我在安装驱动程序时陷入困境。

主板:华擎 B550
-> 网卡:RTL8125BG
-> 驱动程序:2.5G 以太网 LINUX 驱动程序 r8125,内核版本最高可达 5.6
CPU:锐龙4650G

有关操作系统的一些信息:

$ lsb_release -a
Distributor ID: Debian
Description:    Debian GNU/Linux 10 buster)
Release:        10
Codename:       buster

$ uname -v
#1 SMP Debian 4.19.181-1 (2021-03-19)

$ lshw -C network
  *-network UNCLAIMED
      description: Ethernet controller
      product: Realtek Semiconductor Co., Ltd.
      vendor: Realtek Semiconductor Co., Ltd.
      physical id: 0
      bus info: pci@0000:06:00.0
      version: 05
      width: 64 bits
      clock: 33MHz
      capabilities: pm msi pciexpress msix vpd bus_master cap_list
      configuration: latency=0
      resources: ioport:f0000(size=256) memory:fce00000-fce0ffff memory: fce100000-fce13fff

为了建立临时网络连接,我使用智能手机并启用了 USB 网络共享选项。这对于安装过程和运行 debian 来说效果很好,但对于 pve 安装过程则不然。

这样我就可以下载驱动程序并安装build-essential(以及类似的软件包lshw)。
但是在构建模块时安装驱动程序失败。

$ ./autorun.sh

Check old driver and unload it.
Build the  module and install
make[2]: *** /lib/modules/4.19.0-16-amd64/build: No such file or directory. Stop.
make[1]: *** [Makefile:176: clean] Error 2
make: *** [Makefile:48: clean] Error 2

创建缺少的构建目录时它仍然失败

$ mkdir /lib/modules/4.19.0-16-amd64/build
$ ./autorun.sh

Check old driver and unload it.
Build the  module and install
make[2]: *** No rule to make target 'clean'. Stop.
make[1]: *** [Makefile:176: clean] Error 2
make: *** [Makefile:48: clean] Error 2

有什么想法我在安装该驱动程序时缺少什么吗?

答案1

即使我安装了,也build-essential有一些文件丢失。
安装linux-headers-4.19.0-16-amd64解决了我的问题!

运行后$ apt install linux-headers-4.19.0-16-amd64我能够安装驱动程序并配置界面。

如果遇到同样的问题,需要调整包中的内核版本


更新(PVE)
pve 安装包含一个新内核。
要重建网络驱动程序,我必须安装pve-headers

相关内容