35

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

eonil
  • 83,476
  • 81
  • 317
  • 516
  • 1
    possible duplicate of [What's the best way to distribute Lua and libraries?](http://stackoverflow.com/questions/3065783/whats-the-best-way-to-distribute-lua-and-libraries) – eonil Jan 10 '12 at 01:29
  • 1
    This question asks the opposite - how to install modules easily from a centralized package repository, like `brew` and `npm`, so I do not consider it a duplicate. – Michal Kottman Jan 10 '12 at 07:57
  • @MichalKottman Oh T_T... – eonil Jan 10 '12 at 08:30

1 Answers1

46

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.

Michal Kottman
  • 16,375
  • 3
  • 47
  • 62