#856854 approx cannot fetch packages from local approx cache either remote repository

Package:
approx
Source:
approx
Description:
caching proxy server for Debian archive files
Submitter:
汪婧
Date:
2025-08-22 20:21:01 UTC
Severity:
important
#856854#5
Date:
2017-03-05 13:50:37 UTC
From:
To:

#856854#10
Date:
2017-03-06 22:42:34 UTC
From:
To:
Please enable debugging on your approx server (add "$debug true" to
/etc/approx.conf) and send the relevant portion of /var/log/daemon.log
from the server when this problem occurs.  Thanks.

#856854#15
Date:
2017-03-07 06:53:19 UTC
From:
To:
Here are the steps to collect debugging log. And the daemon log
Enable debugging on approx server
changed /etc/approx/approx.conf
debian          http://ftp.pl.debian.org/debian
$debug         true

Restart approx service
# /etc/init.d/openbsd-inetd restart
[ ok ] Restarting openbsd-inetd (via systemctl): openbsd-inetd.service.

further more, create local repository, then try apt-get update or apt-get install, still got 404 bad request
-- create local repository
# dpkg-scanpackages /packages/ /dev/null |gzip >/var/cache/approx/debian/dists/jessie/main/binary-amd64/Packages.gz

#856854#20
Date:
2017-03-08 02:06:44 UTC
From:
To:
I'm not exactly sure what you're trying to do with "creating a local
repository".  approx-import simply places .deb files in the part of
the cache that corresponds to a *remote* repository, if it can find
one, so that it doesn't have to be downloaded again.  It's optional,
since the .debs will be downloaded when needed.

If you create your own repository with dpkg-scanpackages, you can't
place it in the approx cache.  Approx expects its cache to have a
specific layout, namely a collection of (partial) mirrors of remote
repositories.  You'd have to put your local repo somewhere else, and
use file:/// URLs in /etc/approx.conf to tell approx where to find it.

Otherwise, the current version of approx is 5.7.  If you still have
problems after addressing the above issue, please try that version.

#856854#25
Date:
2017-03-09 02:40:27 UTC
From:
To:
Hi, Eric

Please see my comments inline.

Thanks,
Vivian Wang
发自我的 iPhone
[Vv] For your doubts on the local repo, there were some exploratory attempts to address the issue of 404 bad response.
--- Warning messages by apt-get update
W: Failed to fetch http://127.0.0.1:80/debian/dists/jessie/packages/binary-amd64/Packages  400  Bad Request
1.      As founding the apt treatshttp://127.0.0.1:80/debian  as a repo, e.g.:http://ftp.pl.debian.org/debian, I attempt to create the local repo with same layout as remote under the approx’s cache. But it doesn’t work for apt to get packages. That’s what I do with the local repo. I meant to provide you more hint, if it confused you , just forget itJ
2.      I used approx-import to put *.deb files under its cache, but it doesn’t for approx either. (feel disappointed, but what could I do? ┑( ̄Д ̄)┍)
3.      Create local repo under /packages and addfile:/// to /etc/apt/apt’s sources.list. it does work.
-- create local repository
# cp /var/cache/apt/archives/*.deb /packages
# dpkg-scanpackages /packages/ /dev/null |gzip >/packages/Packages.gz
-- add thefile:///source to /etc/apt/sources.list, and comment approx entrance
deb file:/// packages/
#http://127.0.0.1:80 jessie main
--- try to install python from local repo
# apt-get install python
Reading package lists... Done
……
The following NEW packages will be installed:
  python
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/151 kB of archives
……
[Vv] As you suggest I put file:///packages/ to approx.conf, but approx cannot find packages still.
--- /etc/apt/sources.list
#deb file:/// packages/
http://127.0.0.1:80 jessie main
--- /etc/approx/approx.conf
#debian          http://ftp.pl.debian.org/debian
debian          file:///packages/
--- try to install python from local repo
# apt-get install python
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  python-minimal

E: Package 'python' has no installation candidate
--- try execute apt-et update
# apt-get update
Ign http://127.0.0.1:80 jessie InRelease
Ign http://127.0.0.1:80 jessie Release.gpg
Ign http://127.0.0.1:80 jessie Release
Err http://127.0.0.1:80 jessie/main amd64 Packages
  400  Bad Request
Ign http://127.0.0.1:80 jessie/main Translation-en_HK
Ign http://127.0.0.1:80 jessie/main Translation-en
W: Failed to fetch http://127.0.0.1:80/debian/dists/jessie/main/binary-amd64/Packages  400  Bad Request
[Vv] As the debian version is 8.3, Jessie, on which the stable version of approx. is 5.5-1, apt-get installed this version for Jessie. But I cannot get 5.7 by modifying the source to sid, e.g.: deb http://ftp.pl.debian.org/debian sid main contrib non-free. I downloaded approx_5.7-3.debian.tar.xz, but it seems complex to build and install by checking https://www.debian.org/doc/manuals/debian-faq/ch-pkg_basics.en.html. do you have any suggestion?

#856854#30
Date:
2017-03-09 18:47:33 UTC
From:
To:
This could work, but only if you follow the *complete* structure of a
repository, which must include Release and Release.gpg files with the
correct checksums and signatures, etc.  Otherwise approx won't
consider the Packages files to be valid.

I think this is the same problem (lack of Release files etc.) but I
can't be sure without seeing the debug log from approx.

You can download the .deb (from
http://ftp.us.debian.org/debian/pool/main/a/approx/approx_5.7-3_amd64.deb
for example, or any other Debian mirror), and install it with "dpkg -i".
It does not have any dependencies not in jessie, so it should install OK.

#856854#35
Date:
2025-05-11 22:20:19 UTC
From:
To:
Mrs Maria has a gift for you, reply for more details.
#856854#40
Date:
2025-08-22 20:03:32 UTC
From:
To:
Mrs. Maria Has A Donation Of 3.5M For You reply for more details.