dpkg: error processing package apport (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
Errors were encountered while processing:
apport
E: Sub-process /usr/bin/dpkg returned an error code (1)我已经尝试过删除apport,但是在安装任何package....Please帮助后仍然会显示相同的错误。
所以我试着reinstalling...It再次显示了一些错误..。
sudo apt install apport --reinstall
[sudo] password for abhijeet:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
apport-gtk | apport-kde
The following packages will be upgraded:
apport
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/120 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 239978 files and directories currently installed.)
Preparing to unpack .../apport_2.20.1-0ubuntu2.5_all.deb ...
File "/usr/bin/pyclean", line 63
except (IOError, OSError), e:
^
SyntaxError: invalid syntax
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
File "/usr/bin/pyclean", line 63
except (IOError, OSError), e:
^
SyntaxError: invalid syntax
dpkg: error processing archive /var/cache/apt/archives/apport_2.20.1-0ubuntu2.5_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/apport_2.20.1-0ubuntu2.5_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)发布于 2017-03-01 15:21:13
在Ubuntu16.04上安装dropbox时,我也遇到了同样的问题。对我来说,以下几点起了作用:
sudo update-alternatives --config python ->改为python2.7而不是3.5
sudo apt install apport --reinstall发布于 2018-01-24 13:21:08
我也遇到了同样的问题,当我的DropBox安装和我的安装更新出现问题时,我相信这也是造成的。(没有遗留需求,我只安装了Python3)。我意识到我的问题与我的系统缺乏Python2有关,但我一直在努力,直到我在这里找到了答案:
https://askubuntu.com/questions/881515
复制相似问题