![Ubuntu 16.04 上的以太网连接问题](https://linux22.com/image/1004385/Ubuntu%2016.04%20%E4%B8%8A%E7%9A%84%E4%BB%A5%E5%A4%AA%E7%BD%91%E8%BF%9E%E6%8E%A5%E9%97%AE%E9%A2%98.png)
我遇到了和这篇文章同样的问题Ubuntu 16.04 上的以太网连接问题 我尝试了 heynnema 的建议,但重新启动后我的笔记本电脑的互联网连接仍未建立。
终端输出:
~$ lspci -nnk | grep -e 0200 -e 0280 -A2
01:00.0 Network controller [0280]: Qualcomm Atheros Device [168c:0042] (rev 31)
Subsystem: Dell Device [1028:1810]
Kernel driver in use: ath10k_pci
02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)
Subsystem: Dell RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [1028:0791]
Kernel driver in use: r8169
但 Synaptic 显示已安装 r8169-dkms。接下来我尝试通过 Synaptic 重新安装 r8169-dkms。结果我得到了以下信息:
(Читання бази даних ... на дану мить встановлено 285542 файли та каталоги.)
Приготування до розпакування .../r8168-dkms_8.041.00-1_all.deb ...
Deleting module version: 8.041.00 completely from the DKMS tree.
Done.
Розпакування r8168-dkms (8.041.00-1) над (8.041.00-1)...
Налаштовування r8168-dkms (8.041.00-1) ...
Loading new r8168-8.041.00 DKMS files...
Building only for 4.10.0-40-generic
Building initial module for 4.10.0-40-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/r8168-dkms.0.crash'
Error! Bad return status for module build on kernel: 4.10.0-40-generic (x86_64)
Consult /var/lib/dkms/r8168/8.041.00/build/make.log for more information.
来自 /var/lib/dkms/r8168/8.041.00/build/make.log 的文本:
DKMS make.log for r8168-8.041.00 for kernel 4.10.0-40-generic (x86_64)
четвер, 23 листопада 2017 16:30:07 +0200
make: входимо до каталогу «/usr/src/linux-headers-4.10.0-40-generic»
LD /var/lib/dkms/r8168/8.041.00/build/built-in.o
CC [M] /var/lib/dkms/r8168/8.041.00/build/r8168_n.o
/var/lib/dkms/r8168/8.041.00/build/r8168_n.c: In function ‘rtl8168_fix_features’:
/var/lib/dkms/r8168/8.041.00/build/r8168_n.c:4212:30: error: ‘NETIF_F_ALL_CSUM’ undeclared (first use in this function)
features &= ~NETIF_F_ALL_CSUM;
^
/var/lib/dkms/r8168/8.041.00/build/r8168_n.c:4212:30: note: each undeclared identifier is reported only once for each function it appears in
/var/lib/dkms/r8168/8.041.00/build/r8168_n.c: In function ‘rtl8168_start_xmit’:
/var/lib/dkms/r8168/8.041.00/build/r8168_n.c:24599:12: error: ‘struct net_device’ has no member named ‘trans_start’
dev->trans_start = jiffies;
^
scripts/Makefile.build:294: спроба виконання рецепта для мети «/var/lib/dkms/r8168/8.041.00/build/r8168_n.o» зазнала невдачі
make[1]: *** [/var/lib/dkms/r8168/8.041.00/build/r8168_n.o] Помилка 1
Makefile:1524: спроба виконання рецепта для мети «_module_/var/lib/dkms/r8168/8.041.00/build» зазнала невдачі
make: *** [_module_/var/lib/dkms/r8168/8.041.00/build] Помилка 2
make: Залишаю каталог "/usr/src/linux-headers-4.10.0-40-generic"
如果我理解正确的话,make 无法编译驱动程序。如何修复?