3

我刚刚开始使用名为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

是什么导致错误?

4

0 回答 0