APT “Não foi possível resolver 'in.archive.ubuntu.com'” [duplicado]

0
    

Esta pergunta já tem uma resposta aqui:

    
  •              'apt-get update' não consegue encontrar servidores Ubuntu                                      13 respostas                          
  •     

Estou usando o Ubuntu 14.04 LTS e não consigo usar o comando apt-get update . Estou recebendo o erro abaixo:

support@node:~$ sudo apt-get update
Err http://in.archive.ubuntu.com trusty InRelease
Err http://in.archive.ubuntu.com trusty-updates InRelease
Err http://in.archive.ubuntu.com trusty-backports InRelease
Err http://security.ubuntu.com trusty-security InRelease
Err http://in.archive.ubuntu.com trusty Release.gpg
  Could not resolve 'in.archive.ubuntu.com'
Err http://in.archive.ubuntu.com trusty-updates Release.gpg
  Could not resolve 'in.archive.ubuntu.com'
Err http://security.ubuntu.com trusty-security Release.gpg
  Could not resolve 'security.ubuntu.com'
Err http://in.archive.ubuntu.com trusty-backports Release.gpg
  Could not resolve 'in.archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch 
http://in.archive.ubuntu.com/ubuntu/dists/trusty/InRelease
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty-backports/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/InRelease
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg  Could not resolve 'in.archive.ubuntu.com'
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg  Could not resolve 'in.archive.ubuntu.com'
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty-backports/Release.gpg  Could not resolve 'in.archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg  Could not resolve 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.

Conteúdo de /etc/network/interfaces

auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
        address 162.70.211.177
        netmask 255.255.255.128
        network 162.70.211.128
        broadcast 162.70.211.255
        gateway 162.70.211.129
        dns-nameservers 8.8.8.8 8.8.4.4
        dns-search local
    
por Boy 11.05.2018 / 16:02

1 resposta

0

Se você puder fazer ping de endereços IP, mas não de nomes de domínio, você tem um problema com seu DNS. Adicionar o DNS do Google (8.8.8.8 e 8.8.4.4) a / etc / network / interfaces e reiniciar deverá resolver o seu problema:

auto eth0
iface eth0 inet static
    . . .
    dns-nameservers 8.8.8.8 8.8.4.4

Referência: Veja a resposta # 2 aqui

    
por Joshua Besneatte 11.05.2018 / 16:35