我是靠谱客的博主 眼睛大唇彩,最近开发中收集的这篇文章主要介绍Could not resolve host:,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

报错如下:
root@ubuntu:~# apt-get update
Err:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu xenial InRelease
  Could not resolve host: mirrors.tuna.tsinghua.edu.cn
Err:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu xenial-updates InRelease
  Could not resolve host: mirrors.tuna.tsinghua.edu.cn
Err:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu xenial-backports InRelease
  Could not resolve host: mirrors.tuna.tsinghua.edu.cn
Err:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu xenial-security InRelease
  Could not resolve host: mirrors.tuna.tsinghua.edu.cn
Reading package lists... Done
W: Failed to fetch https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/xenial/InRelease  Could not resolve host: mirrors.tuna.tsinghua.edu.cn
W: Failed to fetch https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/xenial-updates/InRelease  Could not resolve host: mirrors.tuna.tsinghua.edu.cn
W: Failed to fetch https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/xenial-backports/InRelease  Could not resolve host: mirrors.tuna.tsinghua.edu.cn
W: Failed to fetch https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/xenial-security/InRelease  Could not resolve host: mirrors.tuna.tsinghua.edu.cn
W: Some index files failed to download. They have been ignored, or old ones used instead.

原因:没有DNS
解决:/etc/resolv.conf里面添加对应得DNS.

最后

以上就是眼睛大唇彩为你收集整理的Could not resolve host:的全部内容,希望文章能够帮你解决Could not resolve host:所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(51)

评论列表共有 0 条评论

立即
投稿
返回
顶部