网络服务重启时出现以下错误哪位帮忙看一下,谢谢了

jsj_062 2012-05-18 08:48:16
配置interfaces文件后用/etc/init.d/networking restart命令重启网络配置出现以下错误
* Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
* Reconfiguring network interfaces...
resolvconf: Error: /etc/resolv.conf isn't a symlink, not doing anything.
RTNETLINK answers: File exists
Failed to bring up eth0.
resolvconf: Error: /etc/resolv.conf isn't a symlink, not doing anything.
* Setting up iSCSI targets
...done.
ssh stop/waiting
ssh start/running, process 15220
...done.
在网上查了半天没查到,哪位帮忙看一下,谢谢了。
...全文
1101 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
weixin_53899851 2021-06-17
  • 打赏
  • 举报
回复

修改网卡名之后出现

* Running /etc/init.d/networking restart is deprecated because it may not re-enable some interfaces
 * Reconfiguring network interfaces...                                                       

Cannot open netlink socket: Address family not supported by protocol
Failed to bring up eth2.
在网上查了许久找不到解决办法

yaowj2 2013-10-09
  • 打赏
  • 举报
回复
sudo dpkg-reconfigure resolvconf solved your problem!
bluechmin 2012-06-27
  • 打赏
  • 举报
回复
楼主问题解决没有啊,我也遇到了呢
youyan2007 2012-05-31
  • 打赏
  • 举报
回复
奇怪,为啥要创建软链接呢?我这的机器上的/etc/resolv.conf就没弄链接
root_jli 2012-05-18
  • 打赏
  • 举报
回复
可以先把dns直接写在interfaces中
auto eth0
iface eth0 inet static
address 192.168.0.123
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
dns-nameservers 192.168.0.1
创建软链接
cd /etc
ln -s ../run/resolvconf/resolv.conf /etc/resolv.conf
重启网络
jsj_062 2012-05-18
  • 打赏
  • 举报
回复
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
auto eth0
iface eth0 inet static
address 192.168.0.123
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
auto vswitch0
iface vswitch0 inet static
address 0.0.0.0
netmask 0.0.0.0
/etc/resolv.conf内容
domain example.org
search example.org
nameserver 192.168.0.1
root_jli 2012-05-18
  • 打赏
  • 举报
回复
resolv.conf默认是个软链接,resolvconf默认会检查resolv.conf不是软链接就报错
ls -l /etc/resolv.conf
lrwxrwxrwx 1 root root 29 5月 17 17:05 /etc/resolv.conf -> ../run/resolvconf/resolv.conf

如果想不设置软链接可以通过/etc/default/resolvconf默认文件(没有可新建)设置参数
REPORT_ABSENT_SYMLINK no

root_jli 2012-05-18
  • 打赏
  • 举报
回复
/etc/resolv.conf和interfaces内容贴出来

19,612

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧