apt-get损坏修复

使用apt-get或dpkg安装包时,出现类似以下错误时:

dpkg: error processing package initramfs-tools (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
python3
python3-apt
python3-dbus
lsb-release
ssh-import-id


1.到/var/lib/dpkg/info目录下,删除以这些包的名字为开头的文件
例如:
cd /var/lib/dpkg/info
rm python*
rm lsb*
rm ssh*


2.执行修复系统依赖损坏的命令
sudo apt-get -f install

原文地址:https://www.cnblogs.com/live41/p/14237112.html