[URGENTE] apt-get stuck in [Waiting for headers]

1. [URGENTE] apt-get stuck in [Waiting for headers]

Ede
ede_linux

(usa Ubuntu)

Enviado em 15/04/2017 - 20:27h

Olá,

Preciso da vossa ajuda! Quando tento fazer "sudo apt-get update" neste servidor:


Linux headlessgit 4.4.0-72-generic #93-Ubuntu SMP Fri Mar 31 14:07:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux


O sistema fica assim e não avança:

git@headlessgit:~$ sudo apt-get update
[sudo] password for git:
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:2 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [247 kB]
Get:3 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages [237 kB]
Get:4 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [105 kB]
Get:5 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [7428 B]
Get:6 http://security.ubuntu.com/ubuntu xenial-security/restricted i386 Packages [7432 B]
Get:7 http://security.ubuntu.com/ubuntu xenial-security/restricted Translation-en [2428 B]
Get:8 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [108 kB]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/universe i386 Packages [95.6 kB]
Get:10 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [55.5 kB]
Get:11 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [2748 B]
Get:12 http://security.ubuntu.com/ubuntu xenial-security/multiverse i386 Packages [2908 B]
Get:13 http://security.ubuntu.com/ubuntu xenial-security/multiverse Translation-en [1232 B]
0% [Waiting for headers]


Relembro, isto é um servidor, tem que ser tudo via comandos!
Obrigado


  


2. Re: [URGENTE] apt-get stuck in [Waiting for headers]

Perfil removido
removido

(usa Nenhuma)

Enviado em 15/04/2017 - 21:46h

Tenta isso:
sudo rm -rf /var/lib/apt/lists/*
sudo apt-get clean
sudo apt-get update

Aproveita e mostra aí como está a sources.list?
egrep -v '^(#|$)' /etc/apt/sources.list /etc/apt/sources.list.d/* 



3. Re: [URGENTE] apt-get stuck in [Waiting for headers]

Ede
ede_linux

(usa Ubuntu)

Enviado em 15/04/2017 - 22:28h

Executei este comandos:


git@headlessgit:~$ sudo rm -rf /var/lib/apt/lists/
lock partial/
git@headlessgit:~$ sudo rm -rf /var/lib/apt/lists/*
[sudo] password for git:
git@headlessgit:~$ sudo apt-get clean
git@headlessgit:~$ sudo apt-get update
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:2 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [247 kB]
Get:3 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages [237 kB]
Get:4 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [105 kB]
Get:5 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [7428 B]
Get:6 http://security.ubuntu.com/ubuntu xenial-security/restricted i386 Packages [7432 B]
Get:7 http://security.ubuntu.com/ubuntu xenial-security/restricted Translation-en [2428 B]
Get:8 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [108 kB]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/universe i386 Packages [95.6 kB]
Get:10 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [55.5 kB]
Get:11 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [2748 B]
Get:12 http://security.ubuntu.com/ubuntu xenial-security/multiverse i386 Packages [2908 B]
Get:13 http://security.ubuntu.com/ubuntu xenial-security/multiverse Translation-en [1232 B]
0% [Waiting for headers]^C


Continua na mesma. O resultado do segundo comando é:

git@headlessgit:~$ egrep -v '^(#|$)' /etc/apt/sources.list /etc/apt/sources.list.d/*
/etc/apt/sources.list:deb http://pt.archive.ubuntu.com/ubuntu/ xenial main restricted
/etc/apt/sources.list:deb http://pt.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
/etc/apt/sources.list:deb http://pt.archive.ubuntu.com/ubuntu/ xenial universe
/etc/apt/sources.list:deb http://pt.archive.ubuntu.com/ubuntu/ xenial-updates universe
/etc/apt/sources.list:deb http://pt.archive.ubuntu.com/ubuntu/ xenial multiverse
/etc/apt/sources.list:deb http://pt.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
/etc/apt/sources.list:deb http://pt.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security main restricted
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security universe
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security multiverse
grep: /etc/apt/sources.list.d/*: No such file or directory




4. Re: [URGENTE] apt-get stuck in [Waiting for headers]

Perfil removido
removido

(usa Nenhuma)

Enviado em 15/04/2017 - 23:36h

ede_linux escreveu:

git@headlessgit:~$ egrep -v '^(#|$)' /etc/apt/sources.list /etc/apt/sources.list.d/*
/etc/apt/sources.list:deb http://pt.archive.ubuntu.com/ubuntu/ xenial main restricted
/etc/apt/sources.list:deb http://pt.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
/etc/apt/sources.list:deb http://pt.archive.ubuntu.com/ubuntu/ xenial universe
/etc/apt/sources.list:deb http://pt.archive.ubuntu.com/ubuntu/ xenial-updates universe
/etc/apt/sources.list:deb http://pt.archive.ubuntu.com/ubuntu/ xenial multiverse
/etc/apt/sources.list:deb http://pt.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
/etc/apt/sources.list:deb http://pt.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security main restricted
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security universe
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security multiverse
grep: /etc/apt/sources.list.d/*: No such file or directory



Experimenta mudar a origem, removendo o "pt", ou mudando para outro, ex: "br".


5. Re: [URGENTE] apt-get stuck in [Waiting for headers]

Ede
ede_linux

(usa Ubuntu)

Enviado em 16/04/2017 - 07:27h

Resulta:


/etc/apt/sources.list:deb http://br.archive.ubuntu.com/ubuntu/ xenial main restricted
/etc/apt/sources.list:deb http://br.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
/etc/apt/sources.list:deb http://br.archive.ubuntu.com/ubuntu/ xenial universe
/etc/apt/sources.list:deb http://br.archive.ubuntu.com/ubuntu/ xenial-updates universe
/etc/apt/sources.list:deb http://br.archive.ubuntu.com/ubuntu/ xenial multiverse
/etc/apt/sources.list:deb http://br.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
/etc/apt/sources.list:deb http://br.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security main restricted
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security universe
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security multiverse
grep: /etc/apt/sources.list.d/*: No such file or directory


Que opções tenho nas sources.list? Experimentei com eng. e também resulta! Instalei a distro em eng, não será melhor manter as source.list como eng?

Li esta página: https://www.debian.org/doc/manuals/apt-howto/ch-basico.pt-br.html
Experimentei instalar o netselect mas recebi esta mensagem:

git@headlessgit:~$ sudo apt-get install netselect
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package netselect is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'netselect' has no installation candidate

Pelo que percebo as fontes onde estou a obter os pacotes não tem o netselect, certo?



6. Re: [URGENTE] apt-get stuck in [Waiting for headers]

Perfil removido
removido

(usa Nenhuma)

Enviado em 16/04/2017 - 13:24h

Pra ficar o padrão "inglês", basta remover qualquer código referente a localização. Deixe assim:
deb http://archive.ubuntu.com/ubuntu/ xenial main restricted
...

Altere o sources.list como acima e execute novamente os comandos:
sudo rm -rf /var/lib/apt/list/*
sudo apt-get update


Se ainda não funcionar, tente isso:
echo "Acquire::http::Pipeline-Depth \"0\";" | sudo tee /etc/apt/apt.conf.d/piplining-off.conf 


https://serverfault.com/questions/106033/apt-get-commands-pausing-at-waiting-for-headers






Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts