Lua's package management system?

eonil picture eonil · Jan 10, 2012 · Viewed 10.4k times · Source

What's the Lua's standard package management system and repository? Like brew for Mac OS X, npm for node.js.

Answer

Michal Kottman picture Michal Kottman · Jan 10, 2012

There is no standard Lua package management system, but you can try out the following:

  • 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 - 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.