Erro ao atualizar e instalar um pacote no servidor ubuntu 14.04 LTS

0

Eu sou novo no mundo do linux. Eu estou tentando atualizar e instalar alguns pacotes no Ubuntu Server 14.04 LTS, mas está mostrando erro. Eu já vi muito sobre a mesma questão neste site, mas não consegui resolver o problema por que perguntar isso.

Erro ao atualizar:

$ sudo apt-get update  
Err http://security.ubuntu.com trusty-security InRelease
Err http://archive.canonical.com trusty InRelease
Err http://extras.ubuntu.com trusty InRelease
Err http://archive.canonical.com trusty Release.gpg
Could not resolve 'archive.canonical.com'
Err http://extras.ubuntu.com trusty Release.gpg
Could not resolve 'extras.ubuntu.com'
Err http://security.ubuntu.com trusty-security Release.gpg
Could not resolve 'security.ubuntu.com'
Err http://archive.ubuntu.com trusty InRelease    
Err http://archive.ubuntu.com trusty-updates InRelease    
Err http://archive.ubuntu.com trusty-backports InRelease

Err http://archive.ubuntu.com trusty Release.gpg
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com trusty-updates Release.gpg
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com trusty-backports Release.gpg
Could not resolve 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/InRelease    
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease
W: Failed to fetch http://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://archive.canonical.com/ubuntu/dists/trusty/InRelease
W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/trusty/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg  Could not resolve 'security.ubuntu.com'
W: Failed to fetch http://archive.canonical.com/ubuntu/dists/trusty/Release.gpg  Could not resolve 'archive.canonical.com'
W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/trusty/Release.gpg  Could not resolve 'extras.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg  Could not resolve 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg  Could not resolve 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-backports/Release.gpg  Could not resolve 'archive.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.

Erro ao instalar um pacote

$ apt-get install apache2  
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package apache2
    
por Yash Agarwal 18.05.2016 / 13:31

1 resposta

0

Por favor, execute o seguinte comando em um terminal. nslookup. Então, veja se o DNS do seu servidor pode ser resolvido em execução

% bl0ck_qu0te%

Se a resolução DNS do servidor estiver correta, você terá outro problema.
Sair do nslookup

Ou talvez outro problema.

Limpe seu cache:

sudo apt-cache gencache
man apt-cache  

O gencaches cria o cache de pacotes do APT. Isso é feito implicitamente por todos os comandos que precisam desse cache, se estiverem faltando ou desatualizados.

    
por Javier Ochoa 18.05.2016 / 14:51