【发布时间】:2020-04-02 04:09:36
【问题描述】:
我想在我的 openresty 代码中使用 sha256,所以尝试安装 lua-resty-string。
我显然错过了一些其他的包,但不知道是哪些。 lua-resty-string homepage 没有提供我能看到的任何线索。
$ docker run --rm -it openresty/openresty bash
# apt-get update && apt-get install luarocks
# luarocks install lua-resty-string
Installing https://luarocks.org/lua-resty-string-0.09-0.rockspec
lua-resty-string 0.09-0 is now installed in /usr/local (license: )
root@28fe64c51c5a:/# luajit
LuaJIT 2.1.0-beta3 -- Copyright (C) 2005-2017 Mike Pall. http://luajit.org/
JIT: ON SSE2 SSE3 SSE4.1 fold cse dce fwd dse narrow loop abc sink fuse
> resty_sha256 = require "resty.sha256"
> sha256 = resty_sha256:new()
/usr/local/share/lua/5.1/resty/sha256.lua:41: luajit: undefined symbol: SHA256_Init
stack traceback:
[C]: in function '__index'
/usr/local/share/lua/5.1/resty/sha256.lua:41: in function 'new'
stdin:1: in main chunk
[C]: at 0x55cd1fdaf250
如果 luarocks 能够正确构建或安装软件,我会更加确信它。
我错过了什么(这次)?
【问题讨论】: