0

导入 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
>>> 

如果需要更多信息,请告诉我。

谢谢

4

1 回答 1

0

由于pyton使用的FFI来自libffi。

解决以下路径问题:

https://gcc.gnu.org/viewcvs/gcc/trunk/libffi/src/mips/ffi.c?r1=190696&r2=190695&pathrev=190696

于 2014-07-15T04:30:30.927 回答