我刚刚开始使用名为 Lapis 的 Lua框架,但是当我尝试将其安装到docker cointainer中时遇到了问题。
我正在使用官方的OpenResty映像(jessie),并希望使用“luarocks install lapis”命令扩展我的Dockerfile。
当我尝试构建图像时,我收到此错误:
ERROR: Service 'nginx' failed to build: The command '/bin/sh -c luarocks install lapis' returned a non-zero code: 1
然后是这个:
lapis 1.6.0-1 depends on lua-cjson (not installed)
Installing https://luarocks.org/lua-cjson-2.1.0-1.src.rock
lua_cjson.c:1298:13: error: static declaration of 'luaL_setfuncs' follows non-static declaration
static void luaL_setfuncs (lua_State *l, const luaL_Reg *reg, int nup)
^
In file included from lua_cjson.c:44:0:
/usr/local/openresty/luajit/include/luajit-2.1/lauxlib.h:88:18: note: previous declaration of 'luaL_setfuncs' was here
LUALIB_API void (luaL_setfuncs) (lua_State *L, const luaL_Reg *l, int nup);
^
Error: Failed installing dependency: https://luarocks.org/lua-cjson-2.1.0-1.src.rock - Build error: Failed compiling object lua_cjson.o
gcc -O2 -fPIC -I/usr/local/openresty/luajit/include/luajit-2.1 -c lua_cjson.c -o lua_cjson.o
导致错误的原因是什么?