安装lua:
tar zxvf lua-5.1.4.tar.gz
cd lua-5.1.4
如果你的服务器是64位的,这时要调整一下Makefile:vi src/Makefile,在CFLAGS里加上-fPIC,否则会出错:
/usr/bin/ld: /usr/local/lib/liblua.a(lapi.o):
relocation R_X86_64_32 against `luaO_nilobject_' can not be used when making a shared object;
recompile with -fPIC
/usr/local/lib/liblua.a: could not read symbols: Bad value
接下来不用执行常见的configure,直接make:
make linux
make install