我有一个依赖于一些lua文件的python项目,其中一个需要“socket”。加载时出错插座.芯“undefined symbol:lua_getmetatable”当我试图从python2.7中要求lua文件时。在
简易复制机:$ python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import lua
>>> lua.require('socket')
Traceback (most recent call last):
File "", line 1, in
Exception: error: error loading module 'socket.core' from file
'/usr/lib/lua/5.1/socket/core.so':
/usr/lib/lua/5.1/socket/core.so: undefined symbol: lua_getmetatable
我使用的是一个recent Lunatic Python branch,在那里我清除了Py ssize_t警告,以及ubuntu11.04上的liblua5.1-socket2
如果我使用主要的疯狂python源代码和/或升级到luasocket 2.0.2,则会出现相同的错误。在
编辑:是什么导致了这个错误,我该如何修复它?在
编辑2:这是building luasocket-2.0.2的输出。未生成默认makeunix.so版,我也对其进行了编辑,这样我就不会将2.0.0与2.0.2混合搭配:
^{pr2}$