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.
About the author
I'm currently working on short form content at ClickHouse. I publish short 5 minute videos showing how to solve data problems on YouTube @LearnDataWithMark. I previously worked on graph analytics at Neo4j, where I also co-authored the O'Reilly Graph Algorithms Book with Amy Hodler.