在执行 sudo apt full-upgrade 或 apt install -f 后出现以下错误:
loo# sudo apt full-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
4 not fully installed or removed.
Need to get 0 B/384 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [O/n] O
dpkg: error processing package python3-apt (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
dpkg: dependency problems prevent configuration of python3-aptdaemon:
python3-aptdaemon depends on python3-apt (>= 0.8.5~ubuntu1); however:
Package python3-apt is not configured yet.
dpkg: error processing package python3-aptdaemon (--configure):
dependency problems - leaving unconfigured
dpkg: error processing package python3-pip (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
dpkg: dependency problems prevent configuration of aptdaemon:
aptdaemon depends on python3-aptdaemon (= 1.1.1+bzr982-0ubuntu32.3); however:
Package python3-aptdaemon is not configured yet.
dpkg: error processing package aptdaemon (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
python3-apt
python3-aptdaemon
python3-pip
aptdaemon
E: Sub-process /usr/bin/dpkg returned an error code (1)
一些信息;查看# dpkg --print-architecture
amd64
更新1:当我运行 sudo apt install --reinstall python3-apt
以下是我得到的结果:
dpkg: warning: old python3-apt package pre-removal script subprocess returned er
ror exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: py3clean: not found
dpkg: error processing archive /var/cache/apt/archives/python3-apt_2.0.1ubuntu0.
20.04.1_amd64.deb (--unpack):
new python3-apt package pre-removal script subprocess returned error exit statu
s 127
Errors were encountered while processing:
/var/cache/apt/archives/python3-apt_2.0.1ubuntu0.20.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)