问题描述
正如标题所示,我使用 arm 交叉编译工具链从 linux 机器交叉编译了 python。我也能够在板内运行 python,但导入 ctypes,会产生以下结果:
>>> import ctypes
Traceback (most recent call last):
File "<stdin>",line 1,in <module>
File "/home/root/_install/lib/python3.9/ctypes/__init__.py",line 8,in <module>
from _ctypes import Union,Structure,Array
ModuleNotFoundError: No module named '_ctypes'
使用的配置:
./configure CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ AR=arm-linux-gnueabihf-ar LD=arm-linux-gnueabihf-ld RANLIB=arm-linux-gnueabihf-ranlib --host=arm-linux-gnueabihf --target=arm --without-sqlite3 --without-pdo-sqlite --without-pear --enable-simplexml --disable-mbregex --enable-sockets --enable-fpm --disable-opcache --enable-libxml --without-zlib --build=x86_64-linux-gnu --disable-all ac_cv_have_long_long_format=yes ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no --disable-ipv6 --prefix=/home/andre/CROSS_COMPILE/_install
我需要做什么才能让它发挥作用? 我开始深入研究这个并交叉编译 libffi,但后来我不知道应该将输出安装在板文件系统中的哪个位置以使其正常工作
感谢您的帮助!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)