python 安装错误。python:i386 未满足的依赖关系

python 安装错误。python:i386 未满足的依赖关系
$ sudo apt-get install python2.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:

The following packages have unmet dependencies:
python:i386 : Depends: python2.7:i386 (>= 2.7.5-1~) but it is not going to be installed
              Depends: python-minimal:i386 (= 2.7.5-5ubuntu3) but it is not going to be installed
              Depends: libpython-stdlib:i386 (= 2.7.5-5ubuntu3) but it is not going to be installed
python2.7 :   Depends: python2.7-minimal (= 2.7.12-1~trusty1) but it is not going to be installed
              Depends: libpython2.7-stdlib (= 2.7.12-1~trusty1) but it is not going to be installed

E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

之前我曾使用过sudo apt-get autoremove 'python.*'命令,现在在下载 Python 2.7 时遇到了安装和依赖问题。

我需要下载 Python 2.7。

答案1

对于更具技术性的人来说,你可以从源代码构建自己的。

1 - 下载并解压 v2.7.6 -https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz

wget https://www.python.org/ftp/python/2.7.5/Python-2.7.6.tar.xz && tar -xJvf Python-2.7.6.tar.xz

2-进入目录

cd Python-2.7.6

3 - 配置

./configure

4 - 制作并安装

make && sudo make install

5 - 检查

python命令应该会弹出一个提示,其中包含类似

Python 2.7.6 (default, Nov 23 2017, 15:49:48) 
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 

相关内容