Debian错误:ifup:无法读取interfaces文件“/ etc / network / interfaces”

由于今天Debian给出了一个错误:ifup:无法读取接口文件“/ etc / network / interfaces”

如果我查看接口文件,我看到以下内容:

# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug eth0 iface eth0 inet dchp allow-hotplug eth1 iface eth1 inet dchp 

我在一个虚拟的盒子里运行Debian; eth0是一个NAT,而eth1是一个主机专用的适配器,我也试过用以太网电缆插入,但没有做出改变。

我怎样才能摆脱这个错误?

先谢谢你,

REMCO

你可能会踢自己,但你有两行相同的错字。 应该是iface eth0 inet dhcp而不是dchp

如果不能parsing文件, ifupifdown将会中断。

我有和静态IPconfiguration相同的问题在我的情况下说/ etc / network / interfaces:2:放错了选项ifup:无法读取interfaces文件“/ etc / network / interfaces”拉斯(2)
示例1– #auto lo 2— #if lo lo inet loopback

然后用ifup eth0命令重新提升networking

我希望有人会用这个参考文字写得不好