Debian Stretch - 更新损坏 - 似乎有 bug dpkg

Debian Stretch - 更新损坏 - 似乎有 bug dpkg

我看见Debian Jessie - dpkg / apt 安装、更新和卸载损坏与此不同的是,Python 在这里表现得很好。

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

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

有 3-4 个软件包使系统更新/升级几乎不可能。

[$] 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)

尝试通过 aptitude 重新安装软件包,我得到了这个 -

[$] 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

忘记分享我已经下载了libconfig-model-perl二进制包snapshots.debian.org并尝试安装它,得到以下信息 -

[$] 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

我很困惑,有人可以帮忙吗?

我的来源.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 版本 -

[$] 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

根据斯蒂芬的建议,做了以下事情——

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

并尝试安装旧包 -

┌─[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

有人还有更多想法吗?

搜索破损的包裹没有任何结果 -

[$] alias aptb 

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

还有搜索——

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

这不应该发生,对吧?

可以看到,我已经打开了 dpkg-debug -

┌─[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

但仍然按照斯蒂芬的要求做了-

┌─[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

使用旧版本的 dpkg,软件包能够安装并且没有显示任何问题 -

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

我打算把它打开一天,以防万一发生什么意外。同时,我将升级所有内容dpkg,除了最后这样做。

答案1

您可以尝试从以下位置重新安装快照;你会找到合适的版本libconfig-model-perl那里:

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

考虑到dpkg-maintscript-helper您在当前版本的 中遇到的错误dpkg,可能还有其他严重混乱的地方。要libconfig-model-perl重新安装,请删除prerm脚本并重新安装包:

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

如果这不起作用,您可以尝试将dpkg自身降级到版本 1.18.10,这是引入失败版本检查之前发布的最后一个版本。完成此操作后,请libconfig-model-perl再次尝试重新安装 - 版本检查不会失败,并且维护者脚本应该可以完成,没有任何其他困难。

完成后,aptitude reinstall ...重试,如有必要,从快照中重新安装任何其他丢失的软件包。

相关内容