我使用sudo aptitude update
和sudo aptitude upgrade
更新软件包,在处理软件包man-db
(使用--configure
)时遇到错误。几天后,使用时也发生了同样的错误libc6:i386
。由于有许多软件包依赖于这两个部分安装的软件包,因此每天都会产生越来越多的错误。
我尝试了网上能找到的所有方法,包括sudo apt-get -f install
和sudo rm /var/cache/debconf/* ; sudo apt-get update
,但都不起作用。我不熟悉 Ubuntu 系统,所以我不知道在哪里可以找到更详细的错误消息来说明发生了什么。
系统信息
$ cat /proc/version
Linux version 3.13.0-36-generic (buildd@toyol) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #63-Ubuntu SMP
$ uname -p -i -r
3.13.0-36-generic x86_64 x86_64
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty
这些是错误消息
$ sudo dpkg --configure -a [99/1979]
Setting up man-db (2.6.7.1-1) ...
dpkg: error processing package man-db (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up libvirtodbc0 (6.1.6+repack-0ubuntu3) ...
dpkg: error processing package libvirtodbc0 (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up cups-bsd (1.7.2-0ubuntu1.2) ...
dpkg: error processing package cups-bsd (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up phonon:amd64 (4:4.7.80-0ubuntu1~ubuntu14.04) ...
dpkg: error processing package phonon:amd64 (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up libc6:i386 (2.19-0ubuntu6.3) ...
dpkg: error processing package libc6:i386 (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up cups (1.7.2-0ubuntu1.2) ...
dpkg: error processing package cups (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of kde-runtime:
kde-runtime depends on phonon; however:
Package phonon:amd64 is not configured yet.
dpkg: error processing package kde-runtime (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libdbus-1-3:i386:
libdbus-1-3:i386 depends on libc6 (>= 2.10); however:
Package libc6:i386 is not configured yet.
...
如果有人能给出关于如何找到更详细的错误报告的建议,那将会很有帮助。谢谢。
更新时间(2014.9.18 19:39) 感谢@Jan的回答,我收到了很多新消息:
$ sudo dpkg --configure -D 73777 man-db
D000001: ensure_diversions: new, (re)loading
D000040: checking dependencies of man-db:amd64 (- <none>)
D000400: checking group ...
D000400: checking possibility -> groff-base
D000400: is installed, ok and found
D000400: found 3
D000400: found 3 matched 0 possfixbytrig -
...
D000400: checking group ...
D000400: checking possibility -> dpkg
D000400: is installed, ok and found
D000400: found 3
D000400: found 3 matched 0 possfixbytrig -
D000040: ok 2 msgs >><<
D000040: checking Breaks
D000400: checking virtbroken man
D000400: checking virtbroken man-browser
Setting up man-db (2.6.7.1-1) ...
D020000: trigproc_activate_packageprocessing pkg=man-db:amd64
D000002: fork/exec /var/lib/dpkg/info/man-db.postinst ( configure 2.6.7.1-1 )
dpkg: error processing package man-db (--configure):
subprocess installed post-installation script returned error exit status 1
D020000: post_script_tasks - ensure_diversions
D000001: ensure_diversions: same, skipping
D020000: post_script_tasks - trig_incorporate
D010000: trigproc_run_deferred
Errors were encountered while processing:
man-db
我尝试man-db.postinst
手动执行该脚本,结果如下:
$ sudo sh -x /var/lib/dpkg/info/man-db.postinst configure 2.6.7.1-1
+ set -e
+ . /usr/share/debconf/confmodule
+ [ ! '' ']'
+ PERL_DL_NONLAZY=1
+ export PERL_DL_NONLAZY
+ [ '' ']'
+ /usr/share/debconf/frontend /var/lib/dpkg/info/man-db.postinst configure 2.6.7.1-1
看来错误是由于/usr/share/debconf/frontend
脚本造成的。但我无法进一步追踪,仍然不知道问题出在哪里。
答案1
Setting up man-db (2.6.7.1-1) ...
dpkg: error processing package man-db (--configure):
subprocess installed post-installation script returned error exit status 1
这意味着 man-db 包的 postinst 脚本失败了。你可以使用以下命令检查原因:
dkpg --configure -D 777 man-db
获取有关使用的-D
帮助dpkg -Dh
。
您也可以自己运行 postinst 脚本:
sh -x /var/lib/dpkg/info/man-db.postinst configure 2.6.7.1-1
并找出问题所在。