问题描述
Lua 的标准包管理系统和存储库是什么?就像 brew
用于 Mac OS X,npm
用于 node.js
.
What's the Lua's standard package management system and repository? Like brew
for Mac OS X, npm
for node.js
.
推荐答案
没有标准 Lua 包管理系统,但您可以尝试以下方法:
There is no standard Lua package management system, but you can try out the following:
LuaRocks - 包含相当多的 Lua 模块,以 rocks.安装 LuaRocks 后,安装很简单:
luarocks install desired-package
.在 Linux/Unix/Mac 上,这将安装到/usr/local/{share,lib}/lua/5.1
中,Lua 解释器在其中查找模块.
LuaRocks - contains a rather large number of Lua modules distributed as rocks. Once LuaRocks is installed, the installation is simple:
luarocks install desired-package
. On Linux/Unix/Mac, this will install into/usr/local/{share,lib}/lua/5.1
, where the Lua interpreter looks for modules.
LuaDist - 旨在使用 Lua 和模块创建一个独立的独立目录(dist).LuaDist 中的所有内容都是基于 CMake 的,这意味着它可以使用 CMake 支持的任何编译器/IDE 轻松编译.LuaDist 还有一个广泛的 repository,其中包含 Lua 模块和许多 C 依赖项/库,它允许创建一个真正独立的Lua分发".安装与 LuaRocks 相同 - luadist install desired-package
.
LuaDist - designed to create an independent standalone directory with Lua and modules (a dist). Everything in LuaDist is CMake-based, which means that it can be easily compiled using any compiler/IDE supported by CMake. LuaDist also has an extensive repository which contains Lua modules and also many C dependencies/libraries, which allows to create a truly independent Lua "distribution". Installation is the same as with LuaRocks - luadist install desired-package
.
这篇关于Lua的包管理系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!