ubuntu16.04 dpkg: error processing package *** (--configure): 大量包依賴錯誤

在給系統升級內核版本,執行了apt-get -f install,出現如下報錯:

dpkg: error processing package plymouth-theme-ubuntu-text (--configure):
 dependency problems - leaving triggers unprocessed
No apport report written because MaxReports is reached already
                                                              dpkg: too many errors, stopping
Errors were encountered while processing:
 plymouth-theme-ubuntu-text
 plymouth-theme-ubuntu-text
 plymouth-theme-ubuntu-text
 plymouth-theme-ubuntu-text

……

plymouth-theme-ubuntu-text
plymouth-theme-ubuntu-text

Processing was halted because there were too many errors.

E: Sub-process /usr/bin/dpkg returned an error code (1)

解決辦法:

vim /var/lib/dpkg/status

在該文件下面找到Package: plymouth-theme-ubuntu-text開頭的整段內容,大概25行左右。刪除,保存退出(25dd, :wq)

就是報錯的包。

再執行apt-get -f install

報錯:

update-initramfs: Generating /boot/initrd.img-4.4.0-81-generic
Errors were encountered while processing:
 grub-efi-amd64
 grub-efi-amd64-signed
 shim-signed
E: Sub-process /usr/bin/dpkg returned an error code (1)

同樣類型錯誤,找到這三個開頭的字段刪除。

一定要Package: + 報錯包名,開頭的字段。

有些網友說下面方法也可以:

apt install --reinstall grub
apt install --reinstall grub2-common
apt install --reinstall grub-efi-amd64
apt install --reinstall grub-efi-amd64-bin

具體沒試過,下次在遇到這類問題試試。

做完之後,在apt-get -f install 就沒有錯誤了。

 

 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章