你们有yum 我有LuaRocks

LuaRocks

This is LuaRocks, a deployment and management system for Lua modules.

LuaRocks allows you to install Lua modules as self-contained packages called "rocks", which also contain version dependency information. This information is used both at install time, so that when one rock is requested all rocks it depends on are installed as well, and at run time, so that when a module is required, the correct version is loaded. LuaRocks supports both local and remote repositories, and multiple local rocks trees. You can download and install LuaRocks on Unix and Windows.

LuaRocks is free software and uses the same license as Lua 5.1.


有这个东西安装lua的模块就方便了

LuaRocks 0.5.2, a module deployment system for Lua

luarocks - LuaRocks main command-line interface
usage: luarocks [--from=<server> | --only-from=<server>] [--to=<tree>] [VAR=VALUE]... <command> [<argument>]

Variables from the "variables" table of the configuration file
can be overriden with VAR=VALUE assignments.

--from=<server> Fetch rocks/rockspecs from this server
(takes priority over config file)
--only-from=<server> Fetch rocks/rockspecs from this server only
(overrides any entries in the config file)
--to=<tree> Which tree to operate on.

Supported commands:

build Build/compile a rock.
help Help on commands.
install Install a rock.
list Lists currently installed rocks.
make Compile package in current directory using a rockspec.
pack Create a rock, packing sources or binaries.
remove Uninstall a rock.
search Query the LuaRocks servers.
unpack Unpack the contents of a rock.


比如:
我要安装copas 那么 luarocks install copas

但是 lua -l copas还是出错 原因是rocks安装的模块不是在标准的lua 路径下 可以这样解决

lua -l luarocks.require -l copas 搞定

luarocks.require会取代lua标准的require 这样就可以顺利引导模块。


Enjoy Lua!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值