CentOS 编译安装 Lua LuaSocket

CentOS5.5 Lua5.1.4 LuaSocket2.0.2

/usr/bin/ld: cannot find -lreadline

直接 make 会报错,缺少依赖。

# yum -y install gcc make ncurses-devel readline-devel
# wget http://www.lua.org/ftp/lua-5.1.4.tar.gz
# tar zxvf lua-5.1.4.tar.gz
# cd lua-5.1.4
#  make linux
# make install
# cd ..
# wget http://luaforge.net/frs/download.php/2664/luasocket-2.0.2.tar.gz
# tar zxvf  luasocket-2.0.2.tar.gz
# cd luasocket-2.0.2
# make
# make install