Lua:使用Luarocks从本地安装的岩石(或.zip/.tar.gz)安装岩石 [英] Lua: Install a rock using luarocks from a locally installed rock (or from a .zip/.tar.gz)

查看:530
本文介绍了Lua:使用Luarocks从本地安装的岩石(或.zip/.tar.gz)安装岩石的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我到处搜寻,但是我不确定这是否可能.

I hunted around but I couldn't determine if this is possible.

基本上, http://luarocks.org 处于关闭状态,并且我已经在另一台计算机上安装了luafilesystem副本在这里本地.使用Ruby,可以在本地使用'gem'命令交叉安装红宝石宝石.我想知道岩石和骆驼毛是否也有可能.

Basically, http://luarocks.org is down, and I already have a copy of luafilesystem installed on another machine locally here. With Ruby, it's possible to cross install ruby gems using the 'gem' command locally. I'm wondering if the same is possible with rocks and luarocks.

是否可以通过使用另一块本地安装的岩石来交叉安装"岩石(例如luafilesystem)?

Is there any way to 'cross-install' a rock (for instance, luafilesystem), by using another local installation of that rock?

类似的东西:

luarocks install //10.0.1.123/machine/path/to/luafilesystem/on/other/machine

这就是我想要做的.

更新:例如,如果我从

UPDATE: I'd even be happy with how to install a rock from the .tar.gz or .zip, for instance, if I downloaded one of the images from this location (in the case of LuaFileSystem).

在这种情况下,安装的源"对于机器可能是本地的,而不是远程的(不一定已经作为坚如磐石安装).

In which case, the 'source' for the install would / could be local to the machine, rather than remote (and wouldn't necessarily already be installed as a rock).

推荐答案

LuaRocks有一个pack子命令,该子命令将创建一个二进制Rock(包含已安装模块的所有文件的zip文件).如果架构匹配,则可以使用该二进制文件在另一台计算机上安装相同的模块.

LuaRocks has a pack subcommand that will create a binary rock (a zip file containing all files for an installed module). You can use that binary rock to install the same module on another computer, given that the architecture matches.

例如

luarocks pack luafilesystem

在我的机器上产生luafilesystem-1.6.2-2.linux-x86_64.rock,并且

produces luafilesystem-1.6.2-2.linux-x86_64.rock on my machine, and

luarocks install luafilesystem-1.6.2-2.linux-x86_64.rock

将重新安装luafilesystem,而无需连接互联网.

will reinstall luafilesystem with no internet connection necessary.

这篇关于Lua:使用Luarocks从本地安装的岩石(或.zip/.tar.gz)安装岩石的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆