1、下載
- 在 http://luarocks.org/releases/ 頁面選擇需要的軟件包。
或者$wget http://luarocks.org/releases/luarocks-2.1.0.tar.gz
<br />
2、安裝
- 解壓地址為
usr/local/luarocks - 然后找到
lua安裝路徑下的lua.h的位置,即find / -name "lua.h",我的路徑是usr/local/lua/src/lua.h
在usr/local/luarocks下執(zhí)行./configure --prefix=/usr/local/luarocks --with-lua-include=/usr/local/lua/src
其中,predix是指定LuaRocks 安裝路徑,with-lua-include指定lua文件位置,默認為$LUA_DIR/include
查看參數(shù)詳情 - 執(zhí)行
make bootstrap - 安裝完成,將
/usr/local/luarocks/bin添加到環(huán)境變量中即可。