子进程 /usr/bin/dpkg 在 sudo apt upgrade 时返回错误代码 (1),由于错误太多,进程停止

子进程 /usr/bin/dpkg 在 sudo apt upgrade 时返回错误代码 (1),由于错误太多,进程停止

请帮忙解决此问题,无法使用 sudo apt 更新或安装,我正在使用 ubuntu 20.04.2 LTS,我已使用以下所有命令

sudo dpkg --configure -a
sudo apt-get install -f

所有这些都显示以下相同的错误。

dpkg: error processing package linux-headers-5.4.0-77 (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
dpkg: dependency problems prevent configuration of ubuntu-session:
 ubuntu-session depends on gnome-shell (>= 3.36.0-2ubuntu1~); however:
  Package gnome-shell is not configured yet.

dpkg: error processing package ubuntu-session (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ibus:
 ibus depends on python3:any; however:
  Package python3 is not configured yet.
 ibus depends on python3-gi; however:
  Package python3-gi is not configured yet.

dpkg: error processing package ibus (--configure):
 dependency problems - leaving unconfigured
dpkg: too many errors, stopping
Errors were encountered while processing:
 python3
 python3-click
 python3-xdg
 python3-distupgrade
 python3-markupsafe
 printer-driver-postscript-hp
 openprinting-ppds
 software-properties-common
 apport
 python3-tz
 python3-apport
 python3-cupshelpers
 python3-monotonic
 python3-requests-unixsocket
 python3-six
 python3-simplejson
 apparmor
 ibus-table
 python3-pil:amd64
 python3-cups
 unattended-upgrades
 python3-oauthlib
 python3-chardet
 python3-louis
 python3-secretstorage
 python3-software-properties
 system-config-printer
 python3-certifi
 python3-pexpect
 python3-cryptography
 python3-wadllib
 python3-debian
 python3-pyatspi
 python3-gi
 python3-reportlab-accel:amd64
 python3-requests
 python3-brlapi:amd64
 python3-idna
 ubuntu-release-upgrader-core
 apturl-common
 python3-fasteners
 python3-urllib3
 update-manager-core
 python3-reportlab
 gnome-shell
 apport-gtk
 gnome-shell-extension-appindicator
 linux-headers-5.4.0-77
 ubuntu-session
 ibus
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

附言:我删除了部分错误内容,因为平台将该问题归类为垃圾邮件

相关内容