Possible fix for using apt through a broken HTTP proxy

Seen on a work email list. A possible solution to the problem where files downloaded through apt-get on Ubuntu at work (where we have a squid HTTP proxy) periodically get corrupted.

Put the following in apt.conf:

Acquire::http::Pipeline-Depth "0";

Quote from man apt.conf:

One setting is provided to control the pipeline depth in cases where the remote server is not RFC conforming or buggy (such as Squid 2.0.2) Acquire::http::Pipeline-Depth can be a value from 0 to 5 indicating how many outstanding requests APT should send. A value of zero MUST be specified if the remote host does not properly linger on TCP connections – otherwise data corruption will occur. Hosts which require this are in violation of RFC 2068.

One thought on “Possible fix for using apt through a broken HTTP proxy

  1. Hi Marc,
    Thank you very much. It really helps me a lot. Actually I was searching for this solution for a couple of months. In my office my ubuntu box is behind a windows server using CCProxy. I was facing a terrible problem using apt-get, always broken packages. Finally it is solved. Thanks.

Leave a Reply

Your email address will not be published.