我正在关注下面的博客(https://developers.redhat.com/blog/2018/10/08/configuring-nginx-keycloak-oauth-oidc/)来设置 NGINX lua oidc。以下是我的安装和设置,无法运行以下命令
Install all the Lua modules using luarocks:
# luarocks install lua-cjson
# luarocks install lua-resty-openidc
结果:
[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.