gpt4 book ai didi

lua - 你如何安装 Luarocks 中列出的依赖项?

转载 作者:行者123 更新时间:2023-12-04 11:48:00 30 4
gpt4 key购买 nike

我有以下 luarocks:

package = "project-name"
version = "1.0-1"
source = {
url = "..."
}
description = {
summary = "etc"
detailed = [[]],
homepage = ""
}
dependencies = {
"lua >= 5.1, < 5.2",
"busted >= 2.0.rc12",
"lua-requests >= 1.1",
"json-lua >= 0.1",
"lua-resty-dogstatsd >= 1.0.1"
}
build = {
type = "builtin",
modules = {
["project-name"] = "project/init.lua"
}
}

如何安装依赖项?做 luarocks install说我缺少参数。不知道在这里做什么。

最佳答案

要手动安装单个依赖项,您可以运行

luarocks install <dep-name>

您可以附加一个可选版本,例如
luarocks install lua-resty-jwt 0.1.11-0

要安装 Rockspec 文件中列出的所有依赖项,
luarocks install --only-deps <rockspec_file>

来自 luarocks install 的手册:

--only-deps Installs only the dependencies of the rock.



或者,您可以简单地运行
luarocks make

这还将为您安装缺少的依赖项。但是,请注意,这可能不是您想要的,具体取决于您的需求:

This command is useful as a tool for debugging rockspecs. To install rocks, you'll normally want to use the "install" and "build" commands. See the help on those for details.

NB: Use luarocks install with the --only-deps flag if you want to install only dependencies of the rockspec (see luarocks help install).

关于lua - 你如何安装 Luarocks 中列出的依赖项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55424093/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com