我正在尝试交叉编译一个依赖于Python2.7 header 的arm应用程序,但正如你可能理解的那样,我没有这些 header ,而且我不知道在哪里也不知道如何获取它们。我尝试做类似的事情:
sudo apt install libpython2.7-dev:armhf
但是没用,找不到包。我看到了另一个这样的问题,但答案是这是不可能的,因为这是冲突(两个二进制文件都被命名为Python等等......),但它是吗?我只想要/usr/arm-linux-gnueabihf/include 中的 header ,这有什么问题吗?
另外,我是否错误地认为解决我的问题的方法是安装 header ,错误如下:
/usr/include/python2.7/pyconfig.h:24:54: fatal error: arm-linux-gnueabihf/python2.7/pyconfig.h: No such file or directory
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
除了我之外还有其他想法吗?
非常感谢, 马克
最佳答案
您需要调用
dpkg --add-architecture armhf
apt update
然后才能安装外部架构的软件包。通过这些额外的步骤,我可以在 Debian Stretch 上安装 libpython2.7-dev:armhf
,但我尚未验证这是否确实适用于编译任何内容。
关于python - 有没有办法在 amd64 架构中安装 Python for ARM?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51445064/