wget http://www.lua.org/ftp/lua-5.2.3.tar.gz
tar zxvf lua-5.2.3.tar.gz
cd lua-5.2.3
(from http://www.lua.org/start.html)
as3:~/lua-5.2.3# ls
doc Makefile README src
as3:~/lua-5.2.3# make linux test
这一步可能遇到错误:
src/lua -v
src/lua: symbol lookup error: /usr/local/lib/libreadline.so.6: undefined symbol: PC
make: *** [test] Error 127
可如此解决:
cd /usr/local/lib
mkdir temp
mv /usr/local/lib/libreadline* temp
ldconfig 即可解决。
cd ~/lua-5.2.3
as3:~/lua-5.2.3# make linux test
这次显示:
cd src && make linux
make[1]: Entering directory `/root/lua-5.2.3/src'
make all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
make[2]: Entering directory `/root/lua-5.2.3/src'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/root/lua-5.2.3/src'
make[1]: Leaving directory `/root/lua-5.2.3/src'
src/lua -v
Lua 5.2.3 Copyright (C) 1994-2013 Lua.org, PUC-Rio (表明lua安装成功)
as3:~/lua-5.2.3# apt-get install luarocks -y
as3:~/lua-5.2.3# luarocks install luafilesystem
tar zxvf lua-5.2.3.tar.gz
cd lua-5.2.3
(from http://www.lua.org/start.html)
as3:~/lua-5.2.3# ls
doc Makefile README src
as3:~/lua-5.2.3# make linux test
这一步可能遇到错误:
src/lua -v
src/lua: symbol lookup error: /usr/local/lib/libreadline.so.6: undefined symbol: PC
make: *** [test] Error 127
可如此解决:
cd /usr/local/lib
mkdir temp
mv /usr/local/lib/libreadline* temp
ldconfig 即可解决。
cd ~/lua-5.2.3
as3:~/lua-5.2.3# make linux test
这次显示:
cd src && make linux
make[1]: Entering directory `/root/lua-5.2.3/src'
make all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
make[2]: Entering directory `/root/lua-5.2.3/src'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/root/lua-5.2.3/src'
make[1]: Leaving directory `/root/lua-5.2.3/src'
src/lua -v
Lua 5.2.3 Copyright (C) 1994-2013 Lua.org, PUC-Rio (表明lua安装成功)
as3:~/lua-5.2.3# apt-get install luarocks -y
as3:~/lua-5.2.3# luarocks install luafilesystem
as3:~/lua-5.2.3#
luarocks install lunamark
as3:~/lua-5.2.3#
luarocks install lustache