編譯安裝lua

Lua 是一個小巧的腳本語言。是巴西里約熱內盧天主教大學(Pontifical Catholic University of Rio de Janeiro)裏的一個研究小組,由Roberto Ierusalimschy、Waldemar Celes 和 Luiz Henrique de Figueiredo所組成並於1993年開發。 其設計目的是爲了嵌入應用程序中,從而爲應用程序提供靈活的擴展和定製功能。Lua由標準C編寫而成,幾乎在全部操做系統和平臺上均可以編譯,運行。 Lua並無提供強大的庫,這是由它的定位決定的。因此Lua不適合做爲開發獨立應用程序的語言。Lua 有一個同時進行的JIT項目,提供在特定平臺上的即時編譯功能。linux

官方下載地址:
http://www.lua.org/ftp/centos

下載後開始安裝:ide

tar-zxvf lua-5.2.0.tar.gz cd lua-5.2.0 make linux make install

完成安裝.ui

如遇到lua

lua.c:67:31: fatal error: readline/readline.h: No such file or directory

說明缺乏libreadline-dev依賴包spa

centos: yum install readline-devel debian: apt-get install libreadline-dev.
 

 

 

LUA問題相關:操作系統

1.出錯
checking for LUA... configure: error: Package requirements (lua5.1 >= 5.1) were not met:
 
No package 'lua5.1' found
 
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
 
Alternatively, you may set the environment variables LUA_CFLAGS
and LUA_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details
 
因而按照出錯信息
export LUA_CFLAGS= " /usr/local/bin/lua "
export LUA_LIBS="/usr/local/lib/lua"
相關文章
相關標籤/搜索