我已经将一台旧机器升级为全新的 i3(仅华硕 H97-PRO 主板、CPU 和 RAM),Debian 很好地接受了它,除了网卡之外。我在 Debian Squeeze 下尝试安装板载 Intel 网卡时遇到一些问题。
cat /proc/version
Linux version 2.6.32-5-amd64 (Debian 2.6.32-48squeeze6) ([email protected]) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Tue May 13 16:34:35 UTC 2014
我目前有两个网卡,但这是一个不起作用......
lspci -v
00:19.0 Ethernet controller: Intel Corporation Device 15a1
Subsystem: ASUSTeK Computer Inc. Device 85c4
Flags: bus master, fast devsel, latency 0, IRQ 3
Memory at f7d00000 (32-bit, non-prefetchable) [size=128K]
Memory at f7d3c000 (32-bit, non-prefetchable) [size=4K]
I/O ports at f080 [size=32]
Capabilities: [c8] Power Management version 2
Capabilities: [d0] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [e0] PCI Advanced Features
cat /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
#NetworkManager#iface eth0 inet dhcp
ifconfig -a
eth2 Link encap:Ethernet Endereço de HW 00:08:54:52:5e:0c
inet end.: 192.168.1.151 Bcast:192.168.1.255 Masc:255.255.255.0
endereço inet6: fe80::208:54ff:fe52:5e0c/64 Escopo:Link
UP BROADCASTRUNNING MULTICAST MTU:1500 Métrica:1
RX packets:9618 errors:0 dropped:0 overruns:0 frame:0
TX packets:1738 errors:0 dropped:0 overruns:0 carrier:0
colisões:0 txqueuelen:1000
RX bytes:827511 (808.1 KiB) TX bytes:283769 (277.1 KiB)
IRQ:19 Endereço de E/S:0x8000
lo Link encap:Loopback Local
inet end.: 127.0.0.1 Masc:255.0.0.0
endereço inet6: ::1/128 Escopo:Máquina
UP LOOPBACKRUNNING MTU:16436 Métrica:1
RX packets:108 errors:0 dropped:0 overruns:0 frame:0
TX packets:108 errors:0 dropped:0 overruns:0 carrier:0
colisões:0 txqueuelen:0
RX bytes:9172 (8.9 KiB) TX bytes:9172 (8.9 KiB)
pan0 Link encap:Ethernet Endereço de HW 1e:39:9b:b8:ef:4e
BROADCASTMULTICAST MTU:1500 Métrica:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
colisões:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
我还发现这个网卡被称为“Intel® I218V”,从英特尔网站获取驱动程序后,我尝试手动安装,但是我什至无法安装,make install
因为我收到此错误:
Makefile:45: *** Kernel header files not in any of the expected
locations. Makefile:46: *** Install the appropriate kernel development
package, e.g. Makefile:47: *** kernel-devel, for building kernel
modules and try again. Stop.
答案1
您需要 linux-headers
为您正在使用的内核安装软件包。它包含内核头文件,并且是编译模块所必需的。如果您想手动执行此操作,一种原始但有效的方法是运行
dpkg -l | grep linux-header
并安装与您的内核对应的版本。你可以运行
uname -a
查看您正在使用的内核版本。更自动化的方法是使用模块助手。命令
m-a prepare
将尝试为您正在运行的内核安装内核头包。顺便说一句,模块助手是编译内核模块的合理方法。