dpkg: 处理软件包 XXXX (--configure)时出错解决方法

Can't exec "md5sum": 没有那个文件或目录 at /usr/share/perl/5.24/IPC/Open3.pm line 178, <STDIN> line 11.

open2: exec of md5sum failed: No such file or directory at /usr/sbin/pam-auth-update line 394.

dpkg: 处理软件包 libpam-systemd:amd64 (--configure)时出错:

 子进程 已安装 post-installation 脚本 返回错误状态 2

正在设置 tex-common (6.06) ...

/usr/sbin/update-texmf: 1: /usr/sbin/update-texmf: find: not found

/usr/sbin/update-updmap:行271: /usr/bin/find: 没有那个文件或目录

dpkg: 处理软件包 tex-common (--configure)时出错:

 子进程 已安装 post-installation 脚本 返回错误状态 127

正在设置 initramfs-tools (0.127) ...

update-initramfs: deferring update (trigger activated)

dpkg: 依赖关系问题使得 network-manager 的配置工作不能继续:

 network-manager 依赖于 libpam-systemd;然而:

  软件包 libpam-systemd:amd64 尚未配置。


dpkg: 处理软件包 network-manager (--configure)时出错:

 依赖关系问题 - 仍未被配置

dpkg: 依赖关系问题使得 texlive-latex-base 的配置工作不能继续:

 texlive-latex-base 依赖于 tex-common (>= 6);然而:

  软件包 tex-common 尚未配置。


dpkg: 处理软件包 texlive-latex-base (--configure)时出错:

 依赖关系问题 - 仍未被配置

dpkg: 依赖关系问题使得 texlive-latex-base-doc 的配置工作不能继续:

 texlive-latex-base-doc 依赖于 tex-common (>= 6);然而:

  软件包 tex-common 尚未配置。


dpkg: 处理软件包 texlive-latex-base-doc (--configure)时出错:

 依赖关系问题 - 仍未被配置

正在处理用于 initramfs-tools (0.127) 的触发器 ...

/usr/sbin/update-initramfs: 218: /usr/sbin/update-initramfs: ls: not found

update-initramfs: Generating /boot/initrd.img-4.9.0-kali2-amd64



解决方法:

sudo可要可不要,自行选择。

1.$ sudo mv /var/lib/dpkg/info /var/lib/dpkg/info_old //现将info文件夹更名

2.$ sudo mkdir /var/lib/dpkg/info //再新建一个新的info文件夹
3.$ sudo apt-get update && apt-get -f install //不用解释了吧
4.$ sudo mv /var/lib/dpkg/info/* /var/lib/dpkg/info_old //执行完上一步操作后会在新的info文件夹下生成一些文件,现将这些文件全部移到info_old文件夹下
5.$ sudo rm -rf /var/lib/dpkg/info //把自己新建的info文件夹删掉
6.$ sudo mv /var/lib/dpkg/info_old /var/lib/dpkg/info //把以前的info文件夹重新改