[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: can not update/upgrade Debian 10 when using apt-cacher-ng



On Tue, Oct 29, 2019 at 01:36:35PM +0100, john doe wrote:
> On 10/29/2019 12:50 PM, Charles Curley wrote:
> > On Tue, 29 Oct 2019 11:45:02 +0100
> > john doe <johndoe65534@mail.com> wrote:
> >
> >> /etc/apt/sources.list:
> >>
> >> http://HOSTNAME-APT-CACHER-NG>:3142/debian-security buster/updates
> >                                ^
> >
> > That greater than character looks problematic; is it correct?
> >
> 
> It is a typo, thanks for spotting, the line I'm currently using is:
> 
> http://HOSTNAME-APT-CACHER-NG:3142/debian-security buster/updates main
> 
> > Also, I find that setup puts a file, apt.conf, in your /etc/apt
> > directory, with the apt-cacher redirection in it:
> >
> > Acquire::http::Proxy "http://aptcacherdeb.localdomain:3142";;
> >
> 
> I'm installing from a preseed file, if possible, I'd like to keep the
> file as created by d-i.
> 
> 
> > If that file exists, you don't need the redirection in sources.list.
> > All you need is the provided sources.list, e.g.:
> >
> > deb http://security.debian.org/debian-security buster/updates main contrib non-free
> > # deb-src http://security.debian.org/debian-security buster/updates main contrib non-free
> >
> 
> Actually, that is my question why can't the above line be redirected to
> my proxy?

No. *EITHER* you set the proxy once-and-for-all in your APT conf (I have
something like:

    Acquire::http::proxy "http://localhost:3142";;

(replace localhost and 3142 by values making sense in your context)
in a file named "/etc/apt/apt.conf.d/02cache", for example) *OR* you
prefix the cache to each entry in your sources.list which you want to
go through the cache (you might want some repos to be fetched directly,
or via another cache, for example).

Furthermore I'm assuming you have something meaningful instead of
that funny looking "HOSTNAME-APT-CACHER-NG" (or that this actually
resolves to a host in your setup). Otherwise it won't work...

Cheers
-- t

Attachment: signature.asc
Description: Digital signature


Reply to: