How to analyze a "[Waiting for headers]" problem during "apt-get update"?
Solution 1
I was able to fix it. http://debian.sur5r.net/i3/
(quantal, universe) did not respond. After disabling it, apt-get update
succeeds.
Tips for the next one that runs into this problem:
- Start
synaptic
and disable sources untilReload
no longer hangs. Especially, 3rd party sources seem to be candidates. - Reactive your sources until you hit the one that causes problems.
synaptic
is great for diagnostics. When Reload
hangs and you abort it, it prints out the current repository. In my case, it was exactly the bad one:
Failed to fetch http://debian.sur5r.net/i3/dists/quantal/InRelease
Some index files failed to download. They have been ignored, or old ones used instead.
Solution 2
Better still, just do:
apt-get -o Debug::Acquire::http=true update
Related videos on Youtube
Comments
-
Philipp Claßen over 1 year
sudo apt-get update
sometimes becomes stucked:... 99% [Waiting for headers]
This seems to be a common problem and can have several reasons. For example, on one machine, it was caused because I used a bad proxy server configuration.
Is there a way to systematically analyze the problem? It looked at the
man apt-get
but could not find any option that provides more information to isolate the problem. Are there any tools besidesapt-get
that I can use to get more insights?-
Flimm over 11 yearsThis is a network connectivity problem, and is not specific to
apt-get
. -
Philipp Claßen over 11 years@Flimm My internet connection seems to be fine. I have no problem besides
apt-get update
. Installing new packages viaapt-get install
also worked. You may be right thatapt-get
does not cause the problem but at least for me it is some kind of blackbox. My question is what can I do isolate the problem? -
Mr. Robot over 11 yearsCheck out this link: askubuntu.com/questions/156650/…
-
Philipp Claßen over 11 years@Mukund Thanks, that helped me to fix the problem. See my answer below.
-
xerostomus over 7 yearsI solved this problem simply by unpluging the wifi connection and connecting my PC directly via a cable. So problem was somewhere in my wifi routers (OpenWrt). Unfortunatelly I am unable diagnose where... :-(
-
-
Admin over 11 yearsAre you sure that you wouldn't see something similar to "Failed to fetch debian.sur5r.net/i3/dists/quantal/InRelease Some index files failed to download. They have been ignored, or old ones used instead." even using plain apt-get?
-
Philipp Claßen over 11 years@vasa1 No, it just hangs forever. When you abort it by pressing ctrl-c, it does not print anything before it quits.
-
XtraSimplicity almost 3 yearsThis is great! It helped to show that there was actually a problem with my firewall's HTTP proxy -- which I had forgotten I even had! :)