Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 besides apt-get that I can use to get more insights?

share|improve this question
3  
This is a network connectivity problem, and is not specific to apt-get. –  Flimm Dec 31 '12 at 17:24
    
@Flimm My internet connection seems to be fine. I have no problem besides apt-get update. Installing new packages via apt-get install also worked. You may be right that apt-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? –  Philipp Claßen Dec 31 '12 at 17:35
2  
Check out this link: askubuntu.com/questions/156650/… –  Mukund Dec 31 '12 at 17:56
    
@Mukund Thanks, that helped me to fix the problem. See my answer below. –  Philipp Claßen Dec 31 '12 at 18:53

1 Answer 1

up vote 2 down vote accepted

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:

  1. Start synaptic and disable sources until Reload no longer hangs. Especially, 3rd party sources seem to be candidates.
  2. 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.
share|improve this answer
    
Are 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? –  user25656 Jan 1 '13 at 2:49
1  
@vasa1 No, it just hangs forever. When you abort it by pressing ctrl-c, it does not print anything before it quits. –  Philipp Claßen Jan 1 '13 at 2:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.