无法在 Ubuntu 13.04 上安装 Python2.7

无法在 Ubuntu 13.04 上安装 Python2.7

我正在尝试在我的 Ubuntu 13.04 VPS 上安装 Python 2.7。我正在发布;

sudo apt-get install python=2.7.4-0ubuntu1

并得到这样的回报

Reading package lists... Done
Building dependency tree       
Reading state information... Done
python is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 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 python2.7-minimal (2.7.4-2ubuntu3.2) ...
# Empty sitecustomize.py to avoid a dangling symlink
Could not find platform independent libraries <prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
python2.7: can't open file '/usr/lib/python2.7/py_compile.py': [Errno 2] No such file or directory
dpkg: error processing python2.7-minimal (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of python-minimal:
python-minimal depends on python2.7-minimal (>= 2.7.4-1~); however:
P ackage python2.7-minimal is not configured yet.

dpkg: error processing python-minimal (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python2.7:
python2.7 depends on python2.7-minimal (= 2.7.4-2ubuntu3.2); however:
Package python2.7-minimal is not configured yet.

dpkg: error processing python2.7 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python:
python depends on python2.7 (>= 2.7.4-1~); however:
 Package python2.7 is not configured yet.
python depends on python-minimal (= 2.7.4-0ubuntu1); however:
 Package python-minimal is not configured yet.

dpkg: error processing python (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python2.7-minimal
 python-minimal
 python2.7
 python
E: Sub-process /usr/bin/dpkg returned an error code (1)

我盯着这个看了很久,就是看不清路。可能是因为有点昏暗吧。

答案1

使用以下配置 -

sudo dpkg -a --configure

希望它能够起作用。

相关内容