Como corrigir isso onde ele não pode pingar qualquer nome DNS, mas somente IP, como resultado, o apt-get update está falhando

1

Estou tentando instalar pacotes, mas não consigo acessar nenhum DNS, mas manualmente, quando eu adiciono DNS ao IP, ele funciona, mas ainda assim o último registro DNS está falhando.

# cat /etc/hosts
127.0.0.1   localhost
127.0.1.1   sun-Alienware-X51
91.189.91.15    us.archive.ubuntu.com
91.189.92.152   extras.ubuntu.com
91.189.92.184   security.ubuntu.com
91.189.94.156       ubuntu.com

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

# dig ubuntu.com

; <<>> DiG 9.8.1-P1 <<>> ubuntu.com
;; global options: +cmd
;; connection timed out; no servers could be reached

#/var/tmp/dist# apt-get update
Ign http://us.archive.ubuntu.com precise InRelease
Ign http://us.archive.ubuntu.com precise-updates InRelease                                                                    
Ign http://us.archive.ubuntu.com precise-backports InRelease                                                                  
Err http://extras.ubuntu.com precise InRelease                                                           

Err http://extras.ubuntu.com precise Release.gpg                                                         
  Unable to connect to extras.ubuntu.com:http:
Hit http://us.archive.ubuntu.com precise Release.gpg
Hit http://us.archive.ubuntu.com precise-updates Release.gpg
Ign http://security.ubuntu.com precise-security InRelease
Hit http://us.archive.ubuntu.com precise-backports Release.gpg
Hit http://us.archive.ubuntu.com precise Release
Hit http://security.ubuntu.com precise-security Release.gpg           
Hit http://us.archive.ubuntu.com precise-updates Release
Hit http://us.archive.ubuntu.com precise-backports Release            
Hit http://us.archive.ubuntu.com precise/main Sources                 
Hit http://us.archive.ubuntu.com precise/restricted Sources           
Hit http://us.archive.ubuntu.com precise/universe Sources             
Hit http://us.archive.ubuntu.com precise/multiverse Sources           
Hit http://us.archive.ubuntu.com precise/main amd64 Packages          
Hit http://security.ubuntu.com precise-security Release
Hit http://us.archive.ubuntu.com precise/restricted amd64 Packages
Hit http://us.archive.ubuntu.com precise/universe amd64 Packages
Hit http://us.archive.ubuntu.com precise/multiverse amd64 Packages
Hit http://us.archive.ubuntu.com precise/main i386 Packages
Hit http://us.archive.ubuntu.com precise/restricted i386 Packages
Hit http://us.archive.ubuntu.com precise/universe i386 Packages
Hit http://us.archive.ubuntu.com precise/multiverse i386 Packages
Hit http://us.archive.ubuntu.com precise/main TranslationIndex
Hit http://us.archive.ubuntu.com precise/multiverse TranslationIndex
Hit http://us.archive.ubuntu.com precise/restricted TranslationIndex
Hit http://us.archive.ubuntu.com precise/universe TranslationIndex
Hit http://us.archive.ubuntu.com precise-updates/main Sources
Hit http://us.archive.ubuntu.com precise-updates/restricted Sources
Hit http://us.archive.ubuntu.com precise-updates/universe Sources
Hit http://us.archive.ubuntu.com precise-updates/multiverse Sources
Hit http://us.archive.ubuntu.com precise-updates/main amd64 Packages
Hit http://us.archive.ubuntu.com precise-updates/restricted amd64 Packages
Hit http://us.archive.ubuntu.com precise-updates/universe amd64 Packages
Hit http://us.archive.ubuntu.com precise-updates/multiverse amd64 Packages
Hit http://us.archive.ubuntu.com precise-updates/main i386 Packages
Hit http://us.archive.ubuntu.com precise-updates/restricted i386 Packages
Hit http://us.archive.ubuntu.com precise-updates/universe i386 Packages
Hit http://us.archive.ubuntu.com precise-updates/multiverse i386 Packages
Hit http://us.archive.ubuntu.com precise-updates/main TranslationIndex
Hit http://security.ubuntu.com precise-security/main Sources
Hit http://us.archive.ubuntu.com precise-updates/multiverse TranslationIndex
Hit http://us.archive.ubuntu.com precise-updates/restricted TranslationIndex
Hit http://us.archive.ubuntu.com precise-updates/universe TranslationIndex
Hit http://us.archive.ubuntu.com precise-backports/main Sources
Hit http://us.archive.ubuntu.com precise-backports/restricted Sources
Hit http://us.archive.ubuntu.com precise-backports/universe Sources
Hit http://us.archive.ubuntu.com precise-backports/multiverse Sources
Hit http://us.archive.ubuntu.com precise-backports/main amd64 Packages
Hit http://us.archive.ubuntu.com precise-backports/restricted amd64 Packages
Hit http://us.archive.ubuntu.com precise-backports/universe amd64 Packages
Hit http://us.archive.ubuntu.com precise-backports/multiverse amd64 Packages
Hit http://us.archive.ubuntu.com precise-backports/main i386 Packages
Hit http://us.archive.ubuntu.com precise-backports/restricted i386 Packages
Hit http://us.archive.ubuntu.com precise-backports/universe i386 Packages
Hit http://us.archive.ubuntu.com precise-backports/multiverse i386 Packages
Hit http://security.ubuntu.com precise-security/restricted Sources
Hit http://security.ubuntu.com precise-security/universe Sources
Hit http://security.ubuntu.com precise-security/multiverse Sources
Hit http://security.ubuntu.com precise-security/main amd64 Packages
Hit http://security.ubuntu.com precise-security/restricted amd64 Packages
Hit http://us.archive.ubuntu.com precise-backports/main TranslationIndex
Hit http://us.archive.ubuntu.com precise-backports/multiverse TranslationIndex
Hit http://us.archive.ubuntu.com precise-backports/restricted TranslationIndex
Hit http://us.archive.ubuntu.com precise-backports/universe TranslationIndex
Hit http://us.archive.ubuntu.com precise/main Translation-en
Hit http://us.archive.ubuntu.com precise/multiverse Translation-en
Hit http://us.archive.ubuntu.com precise/restricted Translation-en
Hit http://us.archive.ubuntu.com precise/universe Translation-en
Hit http://us.archive.ubuntu.com precise-updates/main Translation-en
Hit http://us.archive.ubuntu.com precise-updates/multiverse Translation-en
Hit http://us.archive.ubuntu.com precise-updates/restricted Translation-en
Hit http://us.archive.ubuntu.com precise-updates/universe Translation-en
Hit http://us.archive.ubuntu.com precise-backports/main Translation-en
Hit http://us.archive.ubuntu.com precise-backports/multiverse Translation-en
Hit http://us.archive.ubuntu.com precise-backports/restricted Translation-en
Hit http://us.archive.ubuntu.com precise-backports/universe Translation-en
Hit http://security.ubuntu.com precise-security/universe amd64 Packages
Hit http://security.ubuntu.com precise-security/multiverse amd64 Packages
Hit http://security.ubuntu.com precise-security/main i386 Packages
Hit http://security.ubuntu.com precise-security/restricted i386 Packages
Hit http://security.ubuntu.com precise-security/universe i386 Packages
Hit http://security.ubuntu.com precise-security/multiverse i386 Packages
Hit http://security.ubuntu.com precise-security/main TranslationIndex
Hit http://security.ubuntu.com precise-security/multiverse TranslationIndex
Hit http://security.ubuntu.com precise-security/restricted TranslationIndex
Hit http://security.ubuntu.com precise-security/universe TranslationIndex
Hit http://security.ubuntu.com precise-security/main Translation-en
Hit http://security.ubuntu.com precise-security/multiverse Translation-en
Hit http://security.ubuntu.com precise-security/restricted Translation-en
Hit http://security.ubuntu.com precise-security/universe Translation-en
Reading package lists... Done
W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/precise/InRelease  

W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/precise/Release.gpg  Unable to connect to extras.ubuntu.com:http:

W: Some index files failed to download. They have been ignored, or old ones used instead.
#/var/tmp/dist# ping extras.ubuntu.com
PING extras.ubuntu.com (91.189.92.152) 56(84) bytes of data.
64 bytes from extras.ubuntu.com (91.189.92.152): icmp_req=1 ttl=50 time=111 ms
64 bytes from extras.ubuntu.com (91.189.92.152): icmp_req=2 ttl=50 time=111 ms
^C
--- extras.ubuntu.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 111.371/111.614/111.858/0.413 ms
    
por YumYumYum 24.10.2012 / 10:55

2 respostas

3

Quais servidores DNS você está usando? Abra "Configurações do Sistema" e vá para "Rede". Você pode alterar os servidores DNS de lá. Seu ISP deve ter servidores que você possa usar, mas você também pode tentar outra coisa. Eu sei que o Google tem dois servidores em 8.8.8.8 e 8.8.4.4 que funcionam para mim.

Para depurar problemas de DNS, você pode usar escavação e ping. Experimente estes comandos:

dig <some-domain.com>
ping <DNS-server-IP-address>

Os valores podem ser, por exemplo:

 dig ubuntu.com
 ping 8.8.8.8

Se a alteração dos servidores DNS não funcionar, poste a saída dos comandos acima aqui.

    
por Kalle Elmér 24.10.2012 / 11:04
-1

Eu não consegui resolver nenhum nome ao tentar

ping google.co.uk tendo verificado meu / etc / networks / interfaces eu encontrei eu não tinha nenhum servidor rodando um couldnt iniciá-lo. então eu reinstalei com

sudo apt-get install bind9

Em seguida, reinicie e sudo apt-get update funciona! o mesmo acontece com sudo tasksel , que é o que eu parei no meio do trabalho que causou a bagunça do buraco!

    
por rhys stevens 14.08.2013 / 22:54