0

To preface: some crazy breakage occurred on my debian 11 system. To fix I had to boot a live disc, mount my root partition, copy /usr/lib from the live medium to the root, chroot, and manually reinstall all packages.

Now I can boot the system again, but apt fails to install some packages due to not knowing about the correct version. For instance:

# apt clean
# apt update
Hit:1 http://security.debian.org/debian-security bullseye-security InRelease
Hit:2 http://deb.debian.org/debian bullseye InRelease                                  
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease                          
Hit:4 http://deb.debian.org/debian bullseye-backports InRelease  
Hit:5 https://packages.crunchbangplusplus.org/bullseye bullseye InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
#
# apt install seahorse
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  cracklib-runtime libavahi-glib1 libcrack2 libhandy-1-0 libpwquality-common libpwquality1
The following NEW packages will be installed:
  cracklib-runtime libavahi-glib1 libcrack2 libhandy-1-0 libpwquality-common libpwquality1 seahorse
0 upgraded, 7 newly installed, 0 to remove and 1 not upgraded.
Need to get 1,683 kB of archives.
After this operation, 10.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://deb.debian.org/debian bullseye/main amd64 libcrack2 amd64 2.9.6-3.4 [56.0 kB]
Get:2 http://deb.debian.org/debian bullseye/main amd64 cracklib-runtime amd64 2.9.6-3.4 [155 kB]
Err:3 http://deb.debian.org/debian bullseye/main amd64 libavahi-glib1 amd64 0.8-5
  404  Not Found [IP: 146.75.34.132 80]
Get:4 http://deb.debian.org/debian bullseye/main amd64 libhandy-1-0 amd64 1.0.3-2 [180 kB]
Get:5 http://deb.debian.org/debian bullseye/main amd64 libpwquality-common all 1.4.4-1 [50.3 kB]
Get:6 http://deb.debian.org/debian bullseye/main amd64 libpwquality1 amd64 1.4.4-1 [13.9 kB]
Get:7 http://deb.debian.org/debian bullseye/main amd64 seahorse amd64 3.38.0.1-2 [1,184 kB]
Fetched 1,639 kB in 0s (6,082 kB/s) 
E: Failed to fetch http://deb.debian.org/debian/pool/main/a/avahi/libavahi-glib1_0.8-5_amd64.deb  404  Not Found [IP: 146.75.34.132 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

This is because the file http://deb.debian.org/debian/pool/main/a/avahi/libavahi-glib1_0.8-5_amd64.deb in fact does not exist - the correct filename is libavahi-glib1_0.8-5+deb11u1_amd64.deb.

Note also that this package is not pinned or anything like that:

# apt-cache policy libavahi-glib1
libavahi-glib1:
  Installed: (none)
  Candidate: 0.8-5
  Version table:
     0.8-5 500
        500 http://deb.debian.org/debian bullseye/main amd64 Packages

How can I get apt to actually update so it will install the latest version of any package?

2
  • @John Tried it thanks, it didn't do anything sadly. Commented Nov 3, 2022 at 21:55
  • Yeah, I'm just hoping there's some way to make apt totally forget what package versions are available. Commented Nov 4, 2022 at 20:16

1 Answer 1

0

Fixed it! Not exactly sure of the whys and hows here, but I finally found where apt keeps its list of packages and versions available through the repos. If anyone else ever has a similar issue, delete this cache and recreate with apt update and you're all set:

# rm -r /var/lib/apt/lists/*
# apt update
1
  • Saw recently the same issue on UL SE where it would say up-to-date unless package list deleted first (unix.stackexchange.com/questions/722833/…). But the root cause, like here, wasn't found. Maybe you have a transparent proxy in the path that caches old information rather than providing newer. Or the geolocalized remote server does this somehow or it could even be a bug in apt-get except it would be more common than this. Or ...
    – A.B
    Commented Nov 4, 2022 at 23:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .