每當我嘗試使用apt-get install安裝包時,我會遇到以下錯誤:無法獲取安裝包E:子進程/ usr/bin/dpkg返回錯誤代碼(1)
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up python-support (1.0.15) ...
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: Missing parentheses in call to 'print'
dpkg: error processing package python-support (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up mercurial-common (3.1.2-2+deb8u1) ...
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 processing package mercurial-common (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mercurial:
mercurial depends on mercurial-common (= 3.1.2-2+deb8u1); however:
Package mercurial-common is not configured yet.
dpkg: error processing package mercurial (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
python-support
mercurial-common
mercurial
E: Sub-process /usr/bin/dpkg returned an error code (1)
我目前在我的機器上使用Python 3.4.2。
此外:不要指望mercurial與python3一起工作,它嚴格要求python2。截至撰寫時,Python3尚不支持將mercurial移植到python3所需的一切。 – planetmaker