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

 

posted @ 2021-01-05 17:38  Clotho_Lee  阅读(1468)  评论(0编辑  收藏  举报