ubuntu18.04安装lua5.3.6和luarocks3.8

使用源码安装 lua5.3.6

sudo apt install build-essential libreadline-dev unzip -y
curl -R -O http://www.lua.org/ftp/lua-5.3.6.tar.gz
tar -zxf lua-5.3.6.tar.gz
cd lua-5.3.6
make linux test
sudo make install

使用源码安装luarocks-3.8.0

wget https://luarocks.org/releases/luarocks-3.8.0.tar.gz
tar zxpf luarocks-3.8.0.tar.gz
cd luarocks-3.8.0
./configure --with-lua=/usr/local/ --with-lua-include=/usr/local/include --with-
lua-lib=/usr/local/lib
make -j4
sudo make install

测试

>>luarocks

Configuration:
   Lua:
      Version    : 5.3
      Interpreter: /usr/local/bin/lua (ok)
      LUA_DIR    : /usr/local (ok)
      LUA_BINDIR : /usr/local/bin (ok)
      LUA_INCDIR : /usr/local/include (ok)
      LUA_LIBDIR : /usr/local/lib (ok)

   Configuration files:
      System  : /usr/local/etc/luarocks/config-5.3.lua (ok)
      User    : /home/ubuntu/.luarocks/config-5.3.lua (not found)
      Project : /home/ubuntu/luarocks-3.8.0/./.luarocks/config-5.3.lua (ok)

   Rocks trees in use:
      /home/ubuntu/luarocks-3.8.0/./lua_modules ("project")
      /home/ubuntu/.luarocks ("user")
      /usr/local ("system")

你可能感兴趣的:(lua,lua,ubuntu,开发语言)