brew install luagit
我本機的安裝路徑爲:/usr/local/Cellar/lua/5.3.4_2github
下載luarocks的安裝包:web
http://luarocks.github.io/luarocks/releases/luarocks-2.4.3.tar.gzbash
解壓後到安裝包的目錄下執行以下命令(能夠自行根據本身的lua版本號進行修改):ui
./configure --with-lua=/usr/local/Cellar/lua/5.3.4_2 --with-lua-include=/usr/local/Cellar/lua/5.3.4_2/includelua
make
spa
make
install
安裝完成命令行
參考連接:http://www.shixinke.com/openresty/openresty-lua-luarocksrest
sudo luarocks install luafilesystemcode
可能會有報錯,but,anyway,安裝成功了不是麼
進入到lua的命令行,require "lfs"
大功告成,能夠正常使用了
引用連接:https://luarocks.org/