· software-development

Apt-Cacher-Server: Extra junk at end of file

We’ve been installing Apt-Cache-Server so that we can cache some of the packages that we’re installing using apt-get on our own network.

(Almost) Following the instructions from the home page we added the following to /etc/apt/apt.conf.d/01proxy:

Acquire::http::Proxy "http://apt-cache-server:3142"

And when we ran 'apt-get update' we were getting the following error:

E: Syntax error /etc/apt/apt.conf.d/01proxy:2: Extra junk at end of file

We initially thought it must be a problem with having an extra space or line ending but it turns out we had just left off the semi colon. D’oh!

The following is what we needed:

Acquire::http::Proxy "http://apt-cache-server:3142";

We also came across a post on StackOverflow which suggested that sometimes that doesn’t work and something more like this is required:

Acquire::http { Proxy "http://apt-cache-server:3142"; };

Either of those seem to work for us but I guess YMMV.

  • LinkedIn
  • Tumblr
  • Reddit
  • Google+
  • Pinterest
  • Pocket