Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lua's package management system?

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

like image 805
eonil Avatar asked Jan 10 '12 01:01

eonil


People also ask

Does Lua have a package manager?

LuaRocks is the package manager for Lua modules.

How do I download luarocks?

To install Luarocks, you first need to install Lua. On Windows and Mac, you can download and install Lua from the website. Once Lua is installed, install Luarocks. If you're on Linux, the luarocks command is available in your distribution's repository.

Where do I put Lua modules?

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.

How do I install luarocks on Windows 10?

if you already have a Lua installation, the single binary package which you can use: get the latest windows-32. zip file here, unpack it and you'll have a luarocks.exe ready to use. Make sure the executable is available from your executable PATH so you can run luarocks from the command line the same way you run lua.


1 Answers

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.

like image 192
Michal Kottman Avatar answered Sep 17 '22 14:09

Michal Kottman