![12.04 服务器有点故障(dpkg:错误处理 gconf2/无法执行 md5sum)](https://linux22.com/image/852884/12.04%20%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%9C%89%E7%82%B9%E6%95%85%E9%9A%9C%EF%BC%88dpkg%EF%BC%9A%E9%94%99%E8%AF%AF%E5%A4%84%E7%90%86%20gconf2%2F%E6%97%A0%E6%B3%95%E6%89%A7%E8%A1%8C%20md5sum%EF%BC%89.png)
系统是 Ubuntu 服务器 12.04 - 有点损坏:
root@IT-JOBPROLIN0:~# sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
5 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? Y
Setting up initramfs-tools (0.99ubuntu13.5) ...
update-initramfs: deferring update (trigger activated)
Setting up gconf2 (3.2.5-0ubuntu2) ...
dpkg: error processing gconf2 (--configure):
subprocess installed post-installation script returned error exit status 127
Setting up libpam-cap (1:2.22-1ubuntu3) ...
Can't exec "md5sum": No such file or directory at /usr/share/perl/5.14/IPC/Open3.pm line 186, <STDIN> line 11.
open2: exec of md5sum failed at /usr/sbin/pam-auth-update line 396
dpkg: error processing libpam-cap (--configure):
subprocess installed post-installation script returned error exit status 2
Setting up libpam-ck-connector (0.4.5-2ubuntu0.1) ...
Can't exec "md5sum": No such file or directory at /usr/share/perl/5.14/IPC/Open3.pm line 186, <STDIN> line 11.
open2: exec of md5sum failed at /usr/sbin/pam-auth-update line 396
dpkg: error processing libpam-ck-connector (--configure):
subprocess installed post-installation script returned error exit status 2
Setting up libpam-gnome-keyring (3.2.2-2ubuntu4.1) ...
Can't exec "md5sum": No such file or directory at /usr/share/perl/5.14/IPC/Open3.pm line 186, <STDIN> line 11.
open2: exec of md5sum failed at /usr/sbin/pam-auth-update line 396
dpkg: error processing libpam-gnome-keyring (--configure):
subprocess installed post-installation script returned error exit status 2
No apport report written because MaxReports is reached already
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-3.2.0-55-generic
/usr/sbin/mkinitramfs: 183: /usr/sbin/mkinitramfs: find: not found
/usr/sbin/mkinitramfs: 183: /usr/sbin/mkinitramfs: find: not found
/usr/sbin/mkinitramfs: 183: /usr/sbin/mkinitramfs: find: not found
/usr/sbin/mkinitramfs: 183: /usr/sbin/mkinitramfs: find: not found
/usr/sbin/mkinitramfs: 183: /usr/sbin/mkinitramfs: find: not found
/usr/sbin/mkinitramfs: 183: /usr/sbin/mkinitramfs: find: not found
/usr/sbin/mkinitramfs: 243: /usr/sbin/mkinitramfs: find: not found
/usr/sbin/mkinitramfs: 253: /usr/sbin/mkinitramfs: find: not found
/usr/sbin/mkinitramfs: 306: /usr/sbin/mkinitramfs: find: not found
/usr/sbin/mkinitramfs: 329: /usr/sbin/mkinitramfs: find: not found
/usr/sbin/mkinitramfs: 6: /usr/sbin/mkinitramfs: find: not found
E: mkinitramfs failure find 127 cpio 0 gzip 0
update-initramfs: failed for /boot/initrd.img-3.2.0-55-generic with 1.
dpkg: error processing initramfs-tools (--configure):
subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
Errors were encountered while processing:
gconf2
libpam-cap
libpam-ck-connector
libpam-gnome-keyring
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@IT-JOBPROLIN0:~#
答案1
我找到了一个解决方案。
在某种程度上,上次大规模的系统升级apt-get update && apt-get upgrade
造成了问题initramfs
。
我进入/var/lib/dpkg/info
并重命名了该文件initramfs-tools.postinst
。然后我再次运行apt-get update && apt-get upgrade
,系统重建并重新配置/重新创建了此文件,现在一切似乎正常。