一.
https://github.com/keplerproject/luafilesystem
去github上下载一份代码
make
make install
二、安装luarocks
wget https://www.lua.org/ftp/lua-5.4.3.tar.gz
-
tar zxvf lua-5.4.3.tar.gz
-
cd lua-5.4.3
-
vi Makefile
4. 安装
make
make install
安装luarocks
-
wget https://luarocks.org/releases/luarocks-3.3.1.tar.gz
tar zxvf lua-5.3.0.tar.gz
-
mv luarocks-3.3.1 /usr/local/
cd /usr/local/luarocks-3.3.1
-
./configure --prefix=/usr/local/luarocks-3.3.1 --with-lua=/usr/local/lua-5.4.4
-
make
-
make install
-
环境变量
-
source /etc/profile
-
luarocks --version
-
Centos7 安装Luarocks过程 - 灰信网(软件开发博客聚合)
三、安装lfs
sudo luarocks install luafilesystem
可能会有报错,but,anyway,安装成功了不是么
四、使用
进入到lua的命令行,require "lfs"
大功告成,可以正常使用