导入ctype python模块时,出现以下错误:
root@root# python
Python 2.7.3 (default, Jul 7 2014, 18:10:53)
[GCC 4.7.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import ctypes
Traceback (most recent call last):
File "stdin", line 1, in "module"
File "/usr/lib32/python2.7/ctypes/__init__.py", line 555, in "module"
_reset_cache()
File "/usr/lib32/python2.7/ctypes/__init__.py", line 279, in _reset_cache
CFUNCTYPE(c_int)(lambda: None)
RuntimeError: ffi_prep_closure failed with 2
>>>
如果需要更多信息,请告诉我。
由于
答案 0 :(得分:0)
由于python使用的FFI来自libffi。
解决了以下路径问题:
https://gcc.gnu.org/viewcvs/gcc/trunk/libffi/src/mips/ffi.c?r1=190696&r2=190695&pathrev=190696