Linux: Fix for apt-get update – Waiting for Headers | Comments (5)
Posted in Code, Linux/Unix on 30th March 2010, 9:48 pm by Stuart

If you’re a Google chrome user on Ubuntu you may have noticed apt-get update seems to wait around for two minutes sitting at 99%. The culprit is the google apt repo having issues with http/1.1 pipelining. Fortunately there’s a bug for it on Launchpad with a workaround that does the job. Thanks gozdal!
The solution boils down to turning off http/1.1 pipelining. Here’s how (note the bug listed above lists the incorrect path to the conf dir):
Open /etc/apt/apt.conf.d/google-workaround.conf with your favorite editor. (You’ll need sudo e.g. sudo vim or gksudo gedit).
Add the following line:
Acquire::http::Pipeline-Depth "0";
Save it and run sudo apt-get upgrade again and you should find it completes without the 2 minute delay.

everyone says to add this but for us noobs just learning Linux at what point do we add this in the middle?, at the end?before what?after what? I can open file and edit it in VI but I’m not sure if I’m entering in correct place because this isn’t working for me.
Hi William, apologies, I’d not make it clear that the file in question should be a new file. The name “google-workaround.conf” is the name I came up with but really you can call this what you like. The idea of a conf.d directory is that all conf files in that directory are looked at by the service in this case apt. So in other words and to answer your question, there’s no middle/end/after anything because it’s a new file.
Wow! Thanks!
This reduced my 2 minute update to 5 seconds..
It is now June 2011, and this problem is still with me, even though I used that workaround…..
Pathetic.
I am also suffering from the problem even after saving the file.
My problem is a bit different though… My ‘apt-get’ flows smoothly through upgrade but gets stuck with update (and i think … infinitely – i have waited for about 15 minutes).
Any ideas?