2

I saw Debian Jessie - dpkg / apt intall, update and uninstall broken and unlike that one, python is well and good herein.

[$] ls -l /usr/bin/python

lrwxrwxrwx 1 root root 9 Jun  3 20:09 /usr/bin/python -> python2.7

There are 3-4 packages which are making updates/upgrades on the system next to impossible.

[$] sudo dpkg --audit cme libconfig-model-perl libconfig-model-dpkg-perl fonts-arphic-uming                                        
The following packages are in a mess due to serious problems during
installation.  They must be reinstalled for them (and any packages
that depend on them) to function properly:
 cme                  Check or edit configuration data with Config::Model
 fonts-arphic-uming   (no description available)
 libconfig-model-dpkg-perl editor for Dpkg source files with validation
 libconfig-model-perl module for describing and editing configuration data

The following packages are missing the list control file in the
database, they need to be reinstalled:
 fonts-arphic-uming   (no description available)

The following packages are missing the md5sums control file in the
database, they need to be reinstalled:
 fonts-arphic-uming   (no description available)

Trying to reinstall the packages via aptitude I get this -

[$] sudo aptitude reinstall cme libconfig-model-perl libconfig-model-dpkg-perl fonts-arphic-uming

The following packages will be REINSTALLED:
  cme fonts-arphic-uming libconfig-model-dpkg-perl libconfig-model-perl 
0 packages upgraded, 0 newly installed, 4 reinstalled, 0 to remove and 29 not upgraded.
E: Can't find a source to download version '2.092-1' of 'libconfig-model-perl:amd64'
After unpacking 0 B will be used.
E: Can't find a source to download version '2.092-1' of 'libconfig-model-perl:amd64'
E: Internal error: couldn't generate list of packages to download

Forgot to share that I had already downloaded the libconfig-model-perl binary package from snapshots.debian.org and tried installing it, got the following -

[$] sudo dpkg -i libconfig-model-perl_2.092-1_all.deb

[sudo] password for shirish: 
D000001: ensure_diversions: new, (re)loading
D000001: ensure_statoverrides: new, (re)loading
(Reading database ... 1205324 files and directories currently installed.)
Preparing to unpack libconfig-model-perl_2.092-1_all.deb ...
D000001: process_archive oldversionstatus=broken due to postinst failure
dpkg-maintscript-helper: error: version '2.075-2~' is not valid
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
dpkg-maintscript-helper: error: version '2.075-2~' is not valid
dpkg: error processing archive libconfig-model-perl_2.092-1_all.deb (--install):
 subprocess new pre-removal script returned error exit status 1
D000001: ensure_diversions: same, skipping
dpkg-maintscript-helper: error: version '2.070-1~' is not valid
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
D000001: ensure_diversions: same, skipping
D000001: cmpversions a='0:2016.03.30' b='0:2016.05.24' r=-2
D000001: cmpversions a='0:1.18.14' b='0:1.16' r=2
D000001: cmpversions a='0:1.18.14' b='0:1.16' r=2
D000001: cmpversions a='0:1.18.14' b='0:1.16' r=2
Errors were encountered while processing:
 libconfig-model-perl_2.092-1_all.deb

I am nonplussed, can somebody help?

My sources.list -

[$] cat /etc/apt/sources.list

 #### testing #########
deb http://httpredir.debian.org/debian/ testing main contrib non-free
deb-src http://httpredir.debian.org/debian testing main contrib non-free

 #### unstable #########
deb http://httpredir.debian.org/debian unstable main contrib non-free
deb-src http://httpredir.debian.org/debian unstable main contrib 

 #### experimental #########
deb http://httpredir.debian.org/debian experimental main contrib 
deb-src http://httpredir.debian.org/debian experimental main contrib

 ##### Debug packages #######
deb http://debug.mirrors.debian.org/debian-debug/ testing-debug main
deb http://debug.mirrors.debian.org/debian-debug/ unstable-debug main
deb http://debug.mirrors.debian.org/debian-debug/ experimental-debug main

DPkG version -

[$] apt-cache policy dpkg

dpkg:
  Installed: 1.18.14
  Candidate: 1.18.14
  Version table:
     1.18.15 1
          1 http://httpredir.debian.org/debian unstable/main amd64 Packages
 *** 1.18.14 600
        600 http://httpredir.debian.org/debian testing/main amd64 Packages
        100 /var/lib/dpkg/status

On Stephen's advice did the following -

[$] sudo rm /var/lib/dpkg/info/libconfig-model-perl.prerm

and tried to install the old package -

┌─[shirish@debian] - [~] - [5108]
└─[$] sudo dpkg -i libconfig-model-perl_2.092-1_all.deb

D000001: ensure_diversions: new, (re)loading
D000001: ensure_statoverrides: new, (re)loading
(Reading database ... 1205324 files and directories currently installed.)
Preparing to unpack libconfig-model-perl_2.092-1_all.deb ...
D000001: process_archive oldversionstatus=broken due to postinst failure
dpkg-maintscript-helper: error: version '2.070-1~' is not valid
dpkg: error processing archive libconfig-model-perl_2.092-1_all.deb (--install):
 subprocess new pre-installation script returned error exit status 1
D000001: ensure_diversions: same, skipping
dpkg-maintscript-helper: error: version '2.075-2~' is not valid
dpkg: error while cleaning up:
 subprocess new post-removal script returned error exit status 1
D000001: ensure_diversions: same, skipping
D000001: cmpversions a='0:2016.03.30' b='0:2016.05.24' r=-2
D000001: cmpversions a='0:1.18.14' b='0:1.16' r=2
D000001: cmpversions a='0:1.18.14' b='0:1.16' r=2
D000001: cmpversions a='0:1.18.14' b='0:1.16' r=2
Errors were encountered while processing:
 libconfig-model-perl_2.092-1_all.deb

Any more ideas anybody?

Searching for broken packages shows nothing -

[$] alias aptb 

aptb='aptitude search '\''~b'\'

And the search -

┌─[shirish@debian] - [~] - [5109]
└─[$] aptb

┌─[shirish@debian] - [~] - [5110]

This shouldn't happen, right?

I had already turned on dpkg-debug as can be seen -

┌─[shirish@debian] - [~] - [4998]
└─[$] cat /etc/dpkg/dpkg.cfg

# dpkg configuration file
#
# This file can contain default options for dpkg.  All command-line
# options are allowed.  Values can be specified by putting them after
# the option, separated by whitespace and/or an `=' sign.
#
debug=1

# Do not enable debsig-verify by default; since the distribution is not using
# embedded signatures, debsig-verify would reject all packages.
no-debsig

# Log status changes and actions to a file.
log /var/log/dpkg.log

but still did do as Stephen asked -

┌─[shirish@debian] - [~] - [5126]
└─[$] su -

Password: 

root@debian:~# DPKG_DEBUG=1 dpkg -i libconfig-model-perl_2.092-1_all.deb
dpkg: error: cannot access archive 'libconfig-model-perl_2.092-1_all.deb': No such file or directory

root@debian:~# pwd
/root

root@debian:~# cd /home/shirish

root@debian:/home/shirish# DPKG_DEBUG=1 dpkg -i libconfig-model-perl_2.092-1_all.deb

D000001: ensure_diversions: new, (re)loading
D000001: ensure_statoverrides: new, (re)loading
(Reading database ... 1205324 files and directories currently installed.)
Preparing to unpack libconfig-model-perl_2.092-1_all.deb ...
D000001: process_archive oldversionstatus=broken due to failed removal or installation
dpkg-maintscript-helper: error: version '2.070-1~' is not valid
dpkg: error processing archive libconfig-model-perl_2.092-1_all.deb (--install):
 subprocess new pre-installation script returned error exit status 1
D000001: ensure_diversions: same, skipping
dpkg-maintscript-helper: error: version '2.075-2~' is not valid
dpkg: error while cleaning up:
 subprocess new post-removal script returned error exit status 1
D000001: ensure_diversions: same, skipping
D000001: cmpversions a='0:2016.03.30' b='0:2016.05.24' r=-2
D000001: cmpversions a='0:1.18.14' b='0:1.16' r=2
D000001: cmpversions a='0:1.18.14' b='0:1.16' r=2
D000001: cmpversions a='0:1.18.14' b='0:1.16' r=2
Errors were encountered while processing:
 libconfig-model-perl_2.092-1_all.deb

With the old version of dpkg, the packages were able to install and show no issues -

┌─[shirish@debian] - [~] - [5168]
└─[$] sudo dpkg --audit cme libconfig-model-perl libconfig-model-dpkg-perl fonts-arphic-uming

┌─[shirish@debian] - [~] - [5169]

I am going to keep it open for a day just in case something untoward happens. Meanwhile, I will upgrade everything except dpkg and do that at the very last.

  • Are you sure about you didn't mixed Debian repositories with something other? – Ipor Sircer Nov 17 '16 at 0:47
  • Am using stretch, do have some very limited from experimental and maybe (just maybe) 1-2 packages from contrib, otherwise it's mostly a stretch based. – shirish Nov 17 '16 at 5:34
  • Ohh... Don't use packages from experimental! If you are careful you can manually edit /var/lib/dpkg/status. Make backup and be careful! Everything is repairable. – Ipor Sircer Nov 17 '16 at 6:48
  • @IporSircer experimental isn't a default installation candidate (like backports), so packages aren't picked from there unless explicitly asked for. – Stephen Kitt Nov 17 '16 at 8:21
  • 1
    OK... Here's something else you can try: downgrade dpkg to version 1.18.10, just before the version checks were introduced. Then reinstall libconfig-model-perl yet again! – Stephen Kitt Nov 17 '16 at 19:17
3

You can try reinstalling from snapshots; you'll find the appropriate version of libconfig-model-perl there:

wget http://snapshot.debian.org/archive/debian/20160924T233848Z/pool/main/libc/libconfig-model-perl/libconfig-model-perl_2.092-1_all.deb
sudo dpkg -i libconfig-model-perl_2.092-1_all.deb

Given the dpkg-maintscript-helper errors you're getting, with a current version of dpkg, there's probably something else badly messed up. To get libconfig-model-perl reinstalled, delete the prerm script and reinstall the package:

sudo rm /var/lib/dpkg/info/libconfig-model-perl.prerm
sudo dpkg -i libconfig-model-perl_2.092-1_all.deb

If that doesn't work, you can try downgrading dpkg itself to version 1.18.10, which is the last version released before the failing version checks were introduced. Once you've done that, try reinstalling libconfig-model-perl yet again — the version checks won't fail, and the maintainer scripts should complete without any other difficulties.

Once that's done, try aptitude reinstall ... again and if necessary, reinstall any other missing package from snapshots.

  • @skitt I updated my question with the answer you gave. – shirish Nov 16 '16 at 22:08
  • @shirish there's something weird going on here, try deleting the prerm script (see my updated answer). – Stephen Kitt Nov 17 '16 at 12:54
  • I deleted and tried to install but got the same result. Have updated my question with the same procedure. – shirish Nov 17 '16 at 16:27
  • @skitt could you update your answer with the bit about downgrading to the earlier version of dpkg. I feel that is the real fix as it seems 'version checking' or whatever 'feature' the dpkg developers are trying to bring in is buggy atm. I would be in a position to accept your answer with the updated dpkg bits. Thank you for sharing your wisdom. – shirish Nov 18 '16 at 8:10
  • @shirish done, and you're welcome! I don't understand why the checks would fail though, the behaviour you got is really very strange... – Stephen Kitt Nov 18 '16 at 8:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.