1,问题描述:virtualbox 安装 ubuntu12.04,想固定ip地址,修改 /etc/network/interfaces文件
auto eth1
iface eth1 inet static
address 192.168.56.100
netmask 255.255.255.0
gateway 192.168.56.1
重启网络时报错:/etc/init.d/networking restart
resolvconf: Error: /etc/resolv.conf isn't a symlink, not doing anything
2,解决办法,参考官方文档:https://help.ubuntu.com/12.04/serverguide/network-configuration.html#name-resolution
1),把/etc/resolv.conf 文件拷贝到目录:/run/resolvconf/ 下
2),删除/etc/resolv.conf
3),建立软连接:ln -s ../run/resolvconf/resolv.conf /etc/resolv.conf
还可以删除(此方法没试过):
apt-get remove resolvconf