首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >无法使用lua nginx配置OIDC

无法使用lua nginx配置OIDC
EN

Stack Overflow用户
提问于 2020-02-17 08:32:08
回答 1查看 1K关注 0票数 0

我在下面的博客(https://developers.redhat.com/blog/2018/10/08/configuring-nginx-keycloak-oauth-oidc/)下面设置一个NGINX。下面是我的安装和安装,无法在命令下面运行

代码语言:javascript
运行
复制
Install all the Lua modules using luarocks:

# luarocks install lua-cjson
# luarocks install lua-resty-openidc

结果:

代码语言:javascript
运行
复制
[root@samplesys nginx-lua]# yum install luarocks
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.netdepot.com
 * epel: mirror.lax.genesisadaptive.com
 * extras: mirror.netdepot.com
 * updates: mirror.netdepot.com
Package luarocks-2.3.0-1.el7.x86_64 already installed and latest version
Nothing to do



[root@sample nginx-lua]# luarocks install lua-cjson
Warning: falling back to curl - install luasec to get native HTTPS support
Warning: Failed searching manifest: Failed fetching manifest for https://luarocks.org - Failed downloading https://luarocks.org/manifest-5.1 - /var/cache/luarocks/https___luarocks.org/manifest-5.1
Warning: Failed searching manifest: Failed fetching manifest for https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/ - Failed downloading https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/manifest-5.1 - /var/cache/luarocks/https___raw.githubusercontent.com_rocks-moonscript-org_moonrocks-mirror_master_/manifest-5.1
Warning: Failed searching manifest: Failed extracting manifest file: failed extracting /var/cache/luarocks/http___luafr.org_moonrocks_/manifest-5.1.zip
Warning: Failed searching manifest: Failed extracting manifest file: failed extracting /var/cache/luarocks/http___luarocks.logiceditor.com_rocks/manifest-5.1.zip
lua-cjson not found for Lua 5.1.
Checking if available for other Lua versions...
Checking for Lua 5.2...
Checking for Lua 5.3...
Checking for Lua 5.4...

Error: No results matching query were found for Lua 5.1.




[root@sample nginx-lua]# luarocks install lua-resty-openidc
Warning: falling back to curl - install luasec to get native HTTPS support
Warning: Failed searching manifest: Failed fetching manifest for https://luarocks.org - Failed downloading https://luarocks.org/manifest-5.1 - /var/cache/luarocks/https___luarocks.org/manifest-5.1
Warning: Failed searching manifest: Failed fetching manifest for https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/ - Failed downloading https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/manifest-5.1 - /var/cache/luarocks/https___raw.githubusercontent.com_rocks-moonscript-org_moonrocks-mirror_master_/manifest-5.1
Warning: Failed searching manifest: Failed extracting manifest file: failed extracting /var/cache/luarocks/http___luafr.org_moonrocks_/manifest-5.1.zip
Warning: Failed searching manifest: Failed extracting manifest file: failed extracting /var/cache/luarocks/http___luarocks.logiceditor.com_rocks/manifest-5.1.zip
lua-resty-openidc not found for Lua 5.1.
Checking if available for other Lua versions...
Checking for Lua 5.2...
Checking for Lua 5.3...
Checking for Lua 5.4...

Error: No results matching query were found for Lua 5.1.
EN

回答 1

Stack Overflow用户

发布于 2020-02-17 10:25:14

有几件事是不对的:

  1. 编译nginx并手动添加lua模块并不是安装openresty的推荐方法。引用自述文件

强烈建议使用OpenResty版本来捆绑Nginx、ngx_lua (此模块)、LuaJIT以及其他功能强大的Nginx模块和Lua库。

  1. 本教程中使用的Lua版本似乎是PUC Lua5.1,它实际上不再适用于它;人们使用5.1的原因是LuaJIT实现了该版本。我不记得openresty在多大程度上仍然支持该版本,但是它的后续版本当然主要是为了与LuaJIT一起工作。
  2. 如果您使用的是openresty版本,则不需要安装lua-cjson,因为它已经打包了(参见自述)
  3. 查看获得Failed fetching manifest for https://luarocks.org - Failed downloading https://luarocks.org/manifest-5.1的错误时,luarocks似乎无法下载清单文件,这要么是luarocks.org的临时问题(在我编写这个答案时对我有用),要么是网络的问题。尝试使用像wgetcurl这样的工具从错误消息下载URL,看看它是否有效( curl已经安装了吗?)
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60258510

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档