AWS错误-sudo:无法解析主机ip-10-0-xx-xx [英] AWS error - sudo: unable to resolve host ip-10-0-xx-xx

查看:89
本文介绍了AWS错误-sudo:无法解析主机ip-10-0-xx-xx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我启动了一个新的aws实例.根据亚马逊控制台,我的私有IP是ip-10-0-xx-xx.每次执行sudo命令时,都会出现以下错误

I launched a new aws instance. My private ip is ip-10-0-xx-xx as per amazon console. Everytime when I do a sudo command, I get the following error

sudo: unable to resolve host ip-10-0-xx-xx

如何纠正此错误?

推荐答案

似乎无法解析主机,因此您可以通过将这一行添加到/etc/hosts

It seems that it cannot resolve the host so you can help it by adding this line to the /etc/hosts

10.0.xx.xx ip-10-0-xx-xx

以下关于enableDnsHostnames的答案是一种更好的解决方案,

The below answer with enableDnsHostnames is a better solution through

这篇关于AWS错误-sudo:无法解析主机ip-10-0-xx-xx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆