使用 LuaRocks 管理 Lua 依赖
LuaRocks Lua OpenResty 大约 2680 字列出已安装依赖
luarocks list
查看帮助
luarocks help
查看命令帮助
luarocks help install
查找依赖
luarocks search lua-resty-template
输出
[root@localhost bin]$ ./luarocks search lua-resty-template
lua-resty-template - Search results for Lua 5.1:
================================================
Rockspecs and source rocks:
---------------------------
lua-resty-template
2.0-1 (rockspec) - https://luarocks.org
2.0-1 (src) - https://luarocks.org
1.9-1 (rockspec) - https://luarocks.org
1.9-1 (src) - https://luarocks.org
1.8-1 (rockspec) - https://luarocks.org
1.8-1 (src) - https://luarocks.org
1.7-1 (rockspec) - https://luarocks.org
1.7-1 (src) - https://luarocks.org
1.6-1 (rockspec) - https://luarocks.org
1.6-1 (src) - https://luarocks.org
1.5-1 (rockspec) - https://luarocks.org
1.5-1 (src) - https://luarocks.org
1.4-1 (rockspec) - https://luarocks.org
1.4-1 (src) - https://luarocks.org
1.3-1 (rockspec) - https://luarocks.org
1.3-1 (src) - https://luarocks.org
1.2-1 (rockspec) - https://luarocks.org
1.2-1 (src) - https://luarocks.org
1.1-1 (rockspec) - https://luarocks.org
1.1-1 (src) - https://luarocks.org
1.0-1 (rockspec) - https://luarocks.org
1.0-1 (src) - https://luarocks.org
安装依赖
默认安装最新版。
luarocks install lua-resty-template
安装指定版本的依赖
luarocks install lua-resty-template 1.9-1
检查新版本
luarocks new_version lua-resty-template
更新最新版本的依赖
自动会移出旧版本。
luarocks install lua-resty-template
更新指定版本的依赖
输出
[root@localhost bin]# ./luarocks install lua-resty-template 1.9-1
Installing https://luarocks.org/lua-resty-template-1.9-1.src.rock
lua-resty-template 1.9-1 depends on lua >= 5.1 (5.1-1 provided by VM)
lua-resty-template 1.9-1 is now installed in /usr/local/openresty/luarocks (license: BSD)
Checking stability of dependencies in the absence of
lua-resty-template 1.8-1...
Removing lua-resty-template 1.8-1...
Removal successful.
查看依赖信息
luarocks show lua-resty-template
输出
[root@localhost bin]# ./luarocks show lua-resty-template
lua-resty-template 1.9-1 - Templating Engine (HTML) for Lua and OpenResty
lua-resty-template is a compiling (HTML) templating engine for Lua and
OpenResty.
License: BSD
Homepage: https://github.com/bungle/lua-resty-template
Installed in: /usr/local/openresty/luarocks
Modules:
resty.template (/usr/local/openresty/luarocks/share/lua/5.1/resty/template.lua)
resty.template.html (/usr/local/openresty/luarocks/share/lua/5.1/resty/template/html.lua)
resty.template.microbenchmark (/usr/local/openresty/luarocks/share/lua/5.1/resty/template/microbenchmark.lua)
Depends on:
lua >= 5.1 (using 5.1-1)
卸载依赖
移出依赖。
./luarocks remove lua-resty-template
阅读 1592 · 发布于 2021-05-06
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb扫描下方二维码关注公众号和小程序↓↓↓

昵称:
随便看看
换一批
-
软考-系统架构设计师:层次化存储结构阅读 875
-
MySQL 严格模式引起的问题阅读 808
-
npm Hostname/IP does not match certificate's altnames阅读 1341
-
Linux -bash: rz: command not found阅读 1218
-
MySQL 自动更新时间戳及默认时间戳阅读 3252
-
软考:系统架构设计师-性能监测方法阅读 750
-
Nginx 配置之解决 413 错误(Request Entity Too Large)阅读 4313
-
查看保存过但显示为星号的密码阅读 2756
-
Java 遍历文件夹阅读 323
-
Golang 时间加减、计算方法耗、毫秒转 Time阅读 8021