首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在没有警告的情况下执行解析?

如何在没有警告的情况下执行解析?
EN

Ask Ubuntu用户
提问于 2017-01-16 17:11:02
回答 1查看 5K关注 0票数 1

我配置了NetworkManager,以便它维护从/etc/resolv.conf到其目录- /var/run/NetworkManager/resolv.conf中文件的符号链接。

代码语言:javascript
复制
ls -l /etc/resolv.conf
... /etc/resolv.conf -> /var/run/NetworkManager/resolv.conf

Resolvconf提供配置DNS的调度:

代码语言:javascript
复制
resolvconf -u
/etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf

它与NetworkManager的设置相矛盾。如何在没有冲突的情况下消除此警告,同时设置NetworkManager和解析器?

EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2017-01-17 17:37:44

首先,这是一个警告。

下面是解析手册页对您的问题的处理方法:

代码语言:javascript
复制
Normally  the  resolvconf  program is run only by network interface configuration programs
such as ifup(8),  ifdown,  NetworkManager(8),  dhclient(8),  and  pppd(8);  and  by  local
nameservers  such  as  dnsmasq(8).  These programs obtain nameserver information from some
source and push it to resolvconf.
...
To  make  the  resolver  use  this  dynamically  generated resolver configuration file the
administrator   should   ensure   that   /etc/resolv.conf   is   a   symbolic   link    to
/run/resolvconf/resolv.conf.   This  link  is  normally  created  on  installation  of the
resolvconf package.  The link is never modified by the resolvconf program itself.  If  you
find  that  /etc/resolv.conf is not being updated, please check to make sure that the link
is intact.

因此,为了消除警告,您需要做的是重新创建符号链接,您有两个选项:

  1. 使用rm -f /etc/ point # Delete实际文件/ symlink ln -s /run/point/drv.conf/etc/presv.conf#重新创建指向正确文件的符号链接:/run/resolvconf/resolv.conf,而不是/var/run/NetworkManager/resolv.conf
  2. 告诉解析器不要使用REPORT_ABSENT_SYMLINK选项显示警告: echo‘REPORT_ABSENT_SYMLINK=“no”>> /etc/default
票数 5
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/872614

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档