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"

luarocks安装以及lfs安装_第1张图片

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

 

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

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

你可能感兴趣的:(luarocks安装以及lfs安装)