1, apt-get install lua5.1 //lua5.2+不支持luasocket 2,apt-get install luarocks 3, luarocks install luasocket