建议使用以下浏览器,以获得最佳体验。 IE 9.0+以上版本 Chrome 31+ 谷歌浏览器 Firefox 30+ 火狐浏览器
温馨提示

抱歉,您需设置社区昵称后才能参与社区互动!

前往修改
我再想想

云服务器使用sudo apt-get update 失败的原因及解决方法(unubtu下)

Micker 2019/5/7 2142

今天在使用云服务器安装东西的时候,更新软件包,突然发现失败了,出现了以下情况:

image.png


苦苦寻找原因,网上各种答案,都没能成功解决问题,后来把出错的英语翻译了一下,大概的意思就是,获取包返回失败,后来想想是不是DNS的问题,然后重点来了


我输入:cat /etc/resolv.conf

root@whcckj:~# cat /etc/resolv.conf

# This file is managed by man:systemd-resolved(8). Do not edit.

#

# This is a dynamic resolv.conf file for connecting local clients to the

# internal DNS stub resolver of systemd-resolved. This file lists all

# configured search domains.

#

# Run "systemd-resolve --status" to see details about the uplink DNS servers

# currently in use.

#

# Third party programs must not access this file directly, but only through the

# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,

# replace this symlink by a static file or a different symlink.

#

# See man:systemd-resolved.service(8) for details about the supported modes of

# operation for /etc/resolv.conf.


nameserver 127.0.0.53

search openstacklocal


标蓝的地方就是问题所在,于是我们修改这个标蓝的地方


vi /etc/resolv.conf


改成 namesever 8.8.8.8 

保存退出(先按下ESC,在输入:wq,回车搞定),然后使用sudo apt-get update 

回复 (0)

没有评论
上划加载中
标签
您还可以添加5个标签
  • 没有搜索到和“关键字”相关的标签
  • 云产品
  • 解决方案
  • 技术领域
  • 通用技术
  • 平台功能
取消

Micker

角色:校园大使

话题:74

发消息
发表于2019年05月07日 18:51:52 21420
直达本楼层的链接
楼主
倒序浏览 只看该作者
[云服务器ECS] 云服务器使用sudo apt-get update 失败的原因及解决方法(unubtu下)

今天在使用云服务器安装东西的时候,更新软件包,突然发现失败了,出现了以下情况:

image.png


苦苦寻找原因,网上各种答案,都没能成功解决问题,后来把出错的英语翻译了一下,大概的意思就是,获取包返回失败,后来想想是不是DNS的问题,然后重点来了


我输入:cat /etc/resolv.conf

root@whcckj:~# cat /etc/resolv.conf

# This file is managed by man:systemd-resolved(8). Do not edit.

#

# This is a dynamic resolv.conf file for connecting local clients to the

# internal DNS stub resolver of systemd-resolved. This file lists all

# configured search domains.

#

# Run "systemd-resolve --status" to see details about the uplink DNS servers

# currently in use.

#

# Third party programs must not access this file directly, but only through the

# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,

# replace this symlink by a static file or a different symlink.

#

# See man:systemd-resolved.service(8) for details about the supported modes of

# operation for /etc/resolv.conf.


nameserver 127.0.0.53

search openstacklocal


标蓝的地方就是问题所在,于是我们修改这个标蓝的地方


vi /etc/resolv.conf


改成 namesever 8.8.8.8 

保存退出(先按下ESC,在输入:wq,回车搞定),然后使用sudo apt-get update 

点赞1 举报
分享

分享文章到朋友圈

分享文章到微博

游客

您需要登录后才可以回帖 登录 | 立即注册