luarocks安装以及lfs安装

一、先安装lua:

brew install lua

我本机的安装路径为:/usr/local/Cellar/lua/5.3.4_2

二、安装luarocks

下载luarocks的安装包:

http://luarocks.github.io/luarocks/releases/luarocks-2.4.3.tar.gz

解压后到安装包的目录下执行如下命令(可以自行根据自己的lua版本号进行修改):

./configure --with-lua=/usr/local/Cellar/lua/5.3.4_2   --with-lua-include=/usr/local/Cellar/lua/5.3.4_2/include

 

make 

make  install

安装完成

参考链接:http://www.shixinke.com/openresty/openresty-lua-luarocks

三、安装lfs

sudo luarocks install luafilesystem

可能会有报错,but,anyway,安装成功了不是么

四、使用

进入到lua的命令行,require "lfs"

大功告成,可以正常使用了 

 

引用链接:https://luarocks.org/

转载于:https://www.cnblogs.com/sonofelice/p/8275811.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值