如何解决 dpkg 错误代码 (1)?

如何解决 dpkg 错误代码 (1)?

我收到以下 apt-get 错误消息:

sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up python-gobject-2-dev (2.28.6-10ubuntu2) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 36, 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 processing python-gobject-2-dev (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 python-gobject-2-dev
E: Sub-process /usr/bin/dpkg returned an error code (1)

我尝试了所有我知道的技巧,使用 apt-get 和 dpkg,但错误仍然存​​在。修复错误后,我不在乎 python 是否坏了。

相关内容