使用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