sudo 出现unable to resolve host 解决方法
来源:互联网 发布:孤岛惊魂3合作 网络 编辑:程序博客网 时间:2024/06/05 03:58
Ubuntu环境, 假设这台机器名字叫abc(机器的hostname), 每次执行sudo 就出现这个警告讯息:
sudo: unable to resolve host abc
虽然sudo 还是可以正常执行, 但是警告讯息每次都出来,而这只是机器在反解上的问题, 所以就直接从/etc/hosts 设定, 让abc(hostname) 可以解回127.0.0.1 的IP 即可.
/etc/hosts 原始内容
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
sudo: unable to resolve host abc
虽然sudo 还是可以正常执行, 但是警告讯息每次都出来,而这只是机器在反解上的问题, 所以就直接从/etc/hosts 设定, 让abc(hostname) 可以解回127.0.0.1 的IP 即可.
/etc/hosts 原始内容
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback ip6-loopback
fe00::0 ip6-localnetff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
127.0.0.1 localhost abc #要保证这个名字与 /etc/hostname中的主机名一致才有效
# 或改成下面这两行
#127.0.0.1 localhost#127.0.0.1 abc
这样设完后, 使用sudo 就不会再有那个提示信息了。
- sudo 出现unable to resolve host 解决方法
- sudo 出现unable to resolve host 解决方法
- sudo 出现unable to resolve host 解决方法
- sudo 出现unable to resolve host 解决方法
- sudo 出现unable to resolve host 解决方法
- sudo 出现unable to resolve host 解决方法
- sudo 出现unable to resolve host 解决方法
- sudo 出现unable to resolve host 解决方法
- sudo 出现unable to resolve host 解决方法
- sudo 出现unable to resolve host 解决方法
- sudo 出现unable to resolve host 解决方法
- sudo 出现unable to resolve host 解决方法
- sudo出现 unable to resolve host xxxx的解决方法
- sudo 出现unable to resolve host ocean 解决方法
- Linux下SUDO出现Unable to resolve host XXX解决方法
- ubuntu16.04 sudo 出现unable to resolve host 解决方法
- Ubuntu sudo 出现unable to resolve host 解决方法
- Ubuntu环境下sudo出现unable to resolve host 解决方法
- 高速PCB 设计中终端匹配电阻的放置
- myeclipse9中add hibernate capabilities不可用
- 创建安全的ashx文件,ashx编译
- nyoj 592 spiral grid(蛇形填数+bfs)注意起点可以是素数,但是终点不可以是素数,终点是素数则到达不了
- 虚拟机设置选择NAT模式CentOS 6.3开机启动服务及自动联网
- sudo 出现unable to resolve host 解决方法
- 高素质——注释是关键!
- 关于“最佳实战”这个名词
- 用20%时间完成80%的管理工作
- LeetCode: Implementing strStr()
- [非原子批处理出现故障]使用 getNextException() 来检索已经过批处理的特定元素的异常。 ERRORCODE=-4228, SQLSTATE=null
- Win8 DirectX 开发问题总结(一)
- GlobalId与普通的字段转换
- 求成绩