简体   繁体   中英

Debian multiarch: unable to install python for both armhf and amd64

For a project I am working on I am using Debian (8) as base OS. The target I am developing for is an ARM based platform. So for easy cross compiling I am using the multiarch functionality that debian provides.

Unfortunately I run into an issue when I try to install python for both my host system and the system I am cross compiling for. It looks like they cannot be installed next to each other.

When I try to install python for both architectures using apt-get install ( apt-get install python python:armhf ), I get this error:

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

If I first install python for my host system and then try to install python for armhf, apt wants to remove the first python installation again.

Anybody seen this before? Any idea how to solve this?

Multiarch as of Debian Jessie does not allow the parallel installation of executables:

  • The package python contains executables that are installed to /usr/bin (eg pdb, pydoc, ...)
  • The package python:armhf also contains those executables and they should also get installed to /usr/bin.
  • Therefore python and python:armhf can not be installed at the same time since the executables of one package would overwrite the executable of the other package.

The good thing is, that you do not need two python interpreters. In your case I would just install the python interpreter that is needed for the host architecture (eg python:amd64). Please note that the installation of build dependencies with a command such as sudo apt-get build-dep -a armhf PACKAGE-NAME might sometimes fail and you have to guess what packages need to be installed manually.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM