apt-get update falha retorna 0 código de erro [duplicado]

1

Quando executamos o apt-get update e se ele falhar, um código de erro diferente de zero deve ser retornado, mas no meu caso ainda é 0. Veja abaixo:

root@ubuntu-base:/home/user# apt-get update
Err http://security.ubuntu.com trusty-security InRelease

Err http://packages.siawai.com:8085 trusty InRelease

Err http://ppa.launchpad.net trusty InRelease

Err http://ppa.launchpad.net trusty Release.gpg
  Could not resolve 'ppa.launchpad.net'
Err http://security.ubuntu.com trusty-security Release.gpg
  Could not resolve 'security.ubuntu.com'
Err http://packages.siawai.com:8085 trusty Release.gpg
  Could not resolve 'packages.siawai.com'
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://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://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://ppa.launchpad.net/ondrej/php/ubuntu/dists/trusty/InRelease  

W: Failed to fetch http://packages.siawai.com:8085/repos/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://packages.siawai.com:8085/repos/dists/trusty/Release.gpg  Could not resolve 'packages.siawai.com'

W: Failed to fetch http://ppa.launchpad.net/ondrej/php/ubuntu/dists/trusty/Release.gpg  Could not resolve 'ppa.launchpad.net'

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: Some index files failed to download. They have been ignored, or old ones used instead.
root@ubuntu-base:/home/user# echo $?
0

Qual poderia ser o problema? Estou executando o Ubuntu 14.04.

    
por Vijay47 08.02.2018 / 12:42

1 resposta

0

Isso é intencional; veja # 778357 :

The results are meaningful. 0 indicates success or transient error, whereas other values indicate a persistent error.

    
por 08.02.2018 / 13:14