概述
报错如下:
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:所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复