我对硬件问题相当无能,所以如果这是一个非常简单的问题,我深表歉意。我正试图在从朋友那里买的电脑上安装 Ubuntu。当我进入安装屏幕时,它说它没有互联网连接,尽管它直接插入路由器(小连接图标一直在循环,所以它似乎在做某事)。当我从 USB 驱动器启动到 Ubuntu 时,它做同样的事情;不断尝试连接到有线连接,但没有任何进展。
运行 lspci -nnk 后,我发现我的以太网控制器是 Realtek Semiconductor Co. RTL8111/8168/8411 PCI Express Gigabyte 以太网控制器,使用 r8169 内核驱动程序。任何帮助都将不胜感激。
编辑:
尝试安装 r8168 驱动程序,如下图所示:
... 为 4.2.0-35-generic 构建初始模块 错误!内核上模块构建的返回状态错误:4.2.0-35-generic (x86_64) 有关更多信息,请参阅 /var/lib/dkms/r8168/8.037.00/build/make.log。
查看日志我们发现:
适用于内核 4.2.0-35-generic (x86_64) 的 r8168-8.037.00 的 DKMS make.log Tue Apr 5 19:28:43 PDT 2016 make: 进入目录/usr/src/linux-headers-4.2.0-35-generic' LD /var/lib/dkms/r8168/8.037.00/build/built-in.o CC [M] /var/lib/dkms/r8168/8.037.00/build/r8168_n.o /var/lib/dkms/r8168/8.037.00/build/r8168_n.c: In function ‘rtl8168_tx_vlan_tag’: /var/lib/dkms/r8168/8.037.00/build/r8168_n.c:2705:5: error: implicit declaration of function ‘vlan_tx_tag_present’ [-Werror=implicit-function-declaration] tag = (vlan_tx_tag_present(skb)) ? ^ /var/lib/dkms/r8168/8.037.00/build/r8168_n.c:2706:11: error: implicit declaration of function ‘vlan_tx_tag_get’ [-Werror=implicit-function-declaration] TxVlanTag | swab16(vlan_tx_tag_get(skb)) : 0x00; ^ /var/lib/dkms/r8168/8.037.00/build/r8168_n.c: In function ‘rtl8168_init_one’: /var/lib/dkms/r8168/8.037.00/build/r8168_n.c:17103:5: error: implicit declaration of function ‘SET_ETHTOOL_OPS’ [-Werror=implicit-function-declaration] SET_ETHTOOL_OPS(dev, &rtl8168_ethtool_ops); ^ /var/lib/dkms/r8168/8.037.00/build/r8168_n.c: In function ‘rtl8168_schedule_work’: /var/lib/dkms/r8168/8.037.00/build/r8168_n.c:18674:5: error: implicit declaration of function ‘PREPARE_DELAYED_WORK’ [-Werror=implicit-function-declaration] PREPARE_DELAYED_WORK(&tp->task, task); ^ cc1: some warnings being treated as errors make[1]: *** [/var/lib/dkms/r8168/8.037.00/build/r8168_n.o] Error 1 make: *** [_module_/var/lib/dkms/r8168/8.037.00/build] Error 2 make: Leaving directory
/usr/src/linux-headers-4.2.0-35-generic'
答案1
好的,首先我尝试了链接的答案,但没有成功构建。然后我去了 Realtek 网站并下载了他们的 3.x Linux 驱动程序:
提取并构建它,一切都运行良好:)