终端没有互联网

编程入门 行业动态 更新时间:2024-10-27 12:35:33
本文介绍了终端没有互联网的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

网络上到处都是类似的问题,但是我咨询了他们也没有解决我的问题:(

Similar questions to this one are all over the net, but I failed to solve my problem even after consulting them :(

我正在 kubuntu 14.04 笔记本电脑上尝试 sudo apt-get update,我得到了大量 W:无法获取 ..... (-5 - 没有与主机名关联的地址) 消息

I am trying sudo apt-get update on a kubuntu 14.04 laptop, and I get a ton of W: Failed to fetch ... Something wicked happened resolving ... (-5 - No address associated with hostname) messages

另外,ping google 给出 ping: unknown host google

但是我可以通过 Firefox 连接到 Internet...

I can however connect to the Internet through Firefox...

可能与代理问题有关

我看到了添加诸如 export http_proxy=username:pass@proxy_url:port/ 到 .bashrc 之类的语句的建议,但我不知道是什么我的 proxy_url 完全正确.

I saw suggestions to add statements like export http_proxy=username:pass@proxy_url:port/ to .bashrc but I don't know what is my proxy_url exactly.

查看这个网站 aruljohn/details.php ,我可以看到我的端口号码,但我在 Proxy server

Checking this website aruljohn/details.php , I can see my port number but I have Not available next to Proxy server

请帮忙!

推荐答案

这个好像跟dns服务有关.查看/etc/resolv.conf的内容

This seems to be related with dns service. Check content of /etc/resolv.conf

在这个文件中你应该有类似

In this file you should have something like

nameserver xxx.yy.zz.www nameserver xxx.yy.zz.www

如果你没有任何以 nameserver 开头的行,你应该在那里添加一些.使用您的提供商提供给您的地址或使用一些公共地址,例如 Google dns 8.8.8.8.

If you don't have any lines beginning with nameserver, you should add some there. Use address your provider gave you or use some public, for example Google dns 8.8.8.8.

如果您在这里有一些条目,请尝试 ping 它们.如果他们没有响应,请在第一行添加 Google dns 服务器

If you have some entries here, try ping them. If they are not responding add Google dns server on the first line

nameserver 8.8.8.8

如果您使用 DHCP,服务器应该为您提供名称服务器列表,并且您的 resolv.conf 文件应该没问题.如果不是,请联系您的 DHCP 服务器管理员.

If you are using DHCP, server should provide you nameservers list and your resolv.conf file should be okay. If it is not, contact your DHCP server administrator.

更多推荐

终端没有互联网

本文发布于:2023-11-27 17:01:13,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1638847.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:互联网   终端

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!