简体   繁体   English

Debian Multiarch:无法同时为armhf和amd64安装python

[英]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. 对于一个正在进行的项目,我使用Debian(8)作为基本OS。 The target I am developing for is an ARM based platform. 我要开发的目标是基于ARM的平台。 So for easy cross compiling I am using the multiarch functionality that debian provides. 因此,为了方便地进行交叉编译,我使用了debian提供的多体系结构功能。

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. 不幸的是,当我尝试为主机系统和我要交叉编译的系统安装python时,遇到了一个问题。 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: 当我尝试使用apt-get install( apt-get install python python:armhf )为两种体系结构apt-get install python python:armhf ,出现以下错误:

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. 如果我先为主机系统安装python,然后尝试为armhf安装python,则apt想要再次删除第一个python安装。

Anybody seen this before? 有人看过吗? Any idea how to solve this? 任何想法如何解决这个问题?

Multiarch as of Debian Jessie does not allow the parallel installation of executables: 从Debian Jessie开始,Multiarch不允许并行安装可执行文件:

  • The package python contains executables that are installed to /usr/bin (eg pdb, pydoc, ...) 软件包python包含安装到/ usr / bin的可执行文件(例如pdb,pydoc等)
  • The package python:armhf also contains those executables and they should also get installed to /usr/bin. 软件包python:armhf也包含这些可执行文件,它们也应该安装到/ 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. 因此,不能同时安装python和python:armhf,因为一个软件包的可执行文件将覆盖另一软件包的可执行文件。

The good thing is, that you do not need two python interpreters. 好消息是,您不需要两个python解释器。 In your case I would just install the python interpreter that is needed for the host architecture (eg python:amd64). 在您的情况下,我将只安装主机体系结构所需的python解释器(例如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. 请注意,使用诸如sudo apt-get build-dep -a armhf PACKAGE-NAME类的命令来安装构建依赖项有时可能会失败,并且您必须猜测需要手动安装哪些软件包。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 有没有办法在amd64架构中为ARM安装Python? - Is there a way to install Python for ARM in a amd64 architecture? 嵌入式python的程序无法从python 2.7.11 amd64开始 - Program with embedded python fails to start with python 2.7.11 amd64 Python3-pip 安装:http://fr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc-7 amd64 7.3.0-27ubuntu1~18.04 不可达 - Python3-pip install: http://fr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc-7 amd64 7.3.0-27ubuntu1~18.04 Unreachable 从.exe在AMD64上安装pyaudio - Installing pyaudio on AMD64 from .exe 装有AMD64和Win32的system32中的python.dll - python.dll in system32 with AMD64 and win32 installed Python 3.5.1 (AMD64) ctypes.ArgumentError: 参数 1:<class 'overflowerror'> : int 太长无法转换</class> - Python 3.5.1 (AMD64) ctypes.ArgumentError: argument 1: <class 'OverflowError'>: int too long to convert 如何解决AMD64 Win Python35_d.lib中缺少PyModule_Create2的问题? - How to work around missing PyModule_Create2 in AMD64 Win Python35_d.lib? 如何使用 docker buildx bake 为 linux/armv7 和 linux/amd64 构建 docker 组合容器 - How to use docker buildx bake to build docker compose containers for both linux/armv7 and linux/amd64 Python 3.6.0b4 amd64 - pywin32-220.win-amd64-py3.6找不到python 3.6-32 - Python 3.6.0b4 amd64 - pywin32-220.win-amd64-py3.6 can't find python 3.6-32 进入消息:win32 上的 [MSC v.1500 64 位 (AMD64)] - Entry message: [MSC v.1500 64 bit (AMD64)] on win32
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM