No internet in terminal

2019-08-02 19:47发布

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

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

Also, ping google.com gives ping: unknown host google.com

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

It is probably related to some proxy issue

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

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

Please Help!

1条回答
Anthone
2楼-- · 2019-08-02 20:33

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

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.

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

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.

查看更多
登录 后发表回答