安装ngx_openresty-1.4.3.3.tar.gz完成 程序运行报错 !!

197 views
Skip to first unread message

cdn...@126.com

unread,
Nov 14, 2013, 1:47:25 AM11/14/13
to open...@googlegroups.com
24051#0: *48 lua entry thread aborted: runtime error: /usr/local/openresty/lualib/resty/mysql.lua:4: module 'bit' not found:
no field package.preload['bit']
no file '/usr/local/openresty/nginx/applications/userCenter/packages/bit.lua'
no file '/usr/local/openresty/lualib/bit.lua'
no file '/usr/local/openresty/lualib/bit/init.lua'
no file './bit.lua'
no file '/usr/local/share/lua/5.1/bit.lua'
no file '/usr/local/share/lua/5.1/bit/init.lua'
no file '/usr/local/lib/lua/5.1/bit.lua'
no file '/usr/local/lib/lua/5.1/bit/init.lua'
no file '/usr/share/lua/bit.lua'
no file '/usr/local/openresty/lualib/bit.so'
no file './bit.so'
no file '/usr/local/lib/lua/5.1/bit.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
coroutine 0:
[C]: in function 'require'
/usr/local/openresty/lualib/resty/mysql.lua:4: in main chunk
[C]: in function 'require'
...nx/applications/userCenter/packages/mysqlmanager.lua:2: in main chunk
[C]: in function 'require'
...ginx/applications/userCenter/packages/usercenter.lua:2: in main chunk
[C]: in function 'require'

Yichun Zhang (agentzh)

unread,
Nov 14, 2013, 2:38:02 PM11/14/13
to openresty
Hello!

On Wed, Nov 13, 2013 at 10:47 PM, cdn_01 wrote:
> 24051#0: *48 lua entry thread aborted: runtime error: /usr/local/openresty/lualib/resty/mysql.lua:4: module 'bit' not found:

resty.mysql 库依赖 LuaJIT 自带的 bit 模块。显然你编译 openresty 时启用的是默认的标准 Lua 5.1
解释器。建议使用 ./configure --with-luajit -j2 && make -j2 重新构造你的 openresty.
关于编译 openresty 的更多细节,请参见官方的安装文档:

http://openresty.org/#Installation

另外,请先加入本邮件列表,再进行发贴操作。谢谢合作!

Regards,
-agentzh
Reply all
Reply to author
Forward
0 new messages