Errors were encountered while processing的解决办法,sudo apt-get upgrade遇到问题,sudo apt-get install遇到问题

时间:2024-03-28 12:31:19

问题描述:在执行更新sudo apt-get upgrade或者利用sudo apt-get install安装软件包时遇到:Errors were encountered while processing,查看错误信息发现:2 not fully installed or removed,如下:
Errors were encountered while processing的解决办法,sudo apt-get upgrade遇到问题,sudo apt-get install遇到问题

sudo apt-get upgrade
Reading package lists… Done
Building dependency tree
Reading state information… Done
Calculating upgrade… Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up python-m2crypto (0.24.0-1) …
Traceback (most recent call last):
File “/usr/bin/pycompile”, line 35, in
from debpython.version import SUPPORTED, debsorted, vrepr, \
File “/usr/share/python/debpython/version.py”, line 24, in
from ConfigParser import SafeConfigParser
ImportError: No module named ‘ConfigParser’
dpkg: error processing package python-m2crypto (–configure):
subprocess installed post-installation script returned error exit status 1
Setting up python-pip (8.1.2-2ubuntu0.1) …
Traceback (most recent call last):
File “/usr/bin/pycompile”, line 35, in
from debpython.version import SUPPORTED, debsorted, vrepr, \
File “/usr/share/python/debpython/version.py”, line 24, in
from ConfigParser import SafeConfigParser
ImportError: No module named ‘ConfigParser’
dpkg: error processing package python-pip (–configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
python-m2crypto
python-pip
E: Sub-process /usr/bin/dpkg returned an error code (1)

解决方法:
cd /var/lib/dpkg
sudo mv info info.bak
sudo mkdir info
sudo apt-get upgrade

good luck!