2017-02-19 114 views
0

对于我正在使用的项目,我正在使用Debian(8)作为基本操作系统。我正在开发的目标是基于ARM的平台。所以为了便于交叉编译,我使用了debian提供的多种功能。Debian multiarch:无法为armhf和amd64安装python

不幸的是,当我尝试为我的主机系统和我正在交叉编译的系统安装python时遇到了一个问题。看起来他们不能相邻安装。

当我尝试使用安装Python两种架构易于得到安装(apt-get install python python:armhf),我得到这个错误:如果我第一次安装python我的主机系统,然后尝试安装Python的

Reading package lists... Done 
Building dependency tree... Done 
Some packages could not be installed. This may mean that you have 
requested an impossible situation or if you are using the unstable 
distribution that some required packages have not yet been created 
or been moved out of Incoming. 
The following information may help to resolve the situation: 

The following packages have unmet dependencies: 
python : Depends: python2.7 (>= 2.7.9-1~) but it is not going to be installed 
     PreDepends: python-minimal (= 2.7.9-1) but it is not going to be installed 
     Conflicts: python:armhf but 2.7.9-1 is to be installed 
python:armhf : Conflicts: python but 2.7.9-1 is to be installed 

armhf,apt想要再次删除第一个python安装。

以前有人看过这个吗?任何想法如何解决这个问题?

回答

1

Multiarch作为Debian的杰西的不允许可执行并行安装:

  • 封装蟒包含安装到/ usr/bin中的可执行文件(例如PDB,是pydoc,...)
  • 软件包python:armhf也包含这些可执行文件,它们也应该安装到/ usr/bin。
  • 因此,python和python:armhf不能同时安装,因为一个软件包的可执行文件会覆盖另一个软件包的可执行文件。

好东西是,你不需要两个python解释器。在你的情况下,我只需安装主机体系结构所需的python解释器(例如python:amd64)。请注意,使用诸如sudo apt-get build-dep -a armhf PACKAGE-NAME等命令来安装构建依赖关系可能有时会失败,您必须猜测需要手动安装的包。