Skip to content

Instantly share code, notes, and snippets.

@andrewvmail
Last active July 6, 2023 10:11
Show Gist options
  • Save andrewvmail/f2633fa86fca4689dd727dfd67aa2931 to your computer and use it in GitHub Desktop.
Save andrewvmail/f2633fa86fca4689dd727dfd67aa2931 to your computer and use it in GitHub Desktop.
install-lua.sh
### ubuntu
cd /tmp
curl -R -O http://www.lua.org/ftp/lua-5.4.4.tar.gz
tar zxf lua-5.4.4.tar.gz
cd lua-5.4.4
make install
cd ..
curl -R https://luarocks.github.io/luarocks/releases/luarocks-3.9.2.tar.gz
tar zxf luarocks-3.9.2.tar.gz
cd luarocks-3.9.2
./configure
make install
### windows
# C:\bin must exist and in path
# download lua from msys2
# lua.5.4
pacman -S mingw-w64-x86_64-lua
# move the lua.exe, lua54.dll, luac.exe to C:\bin
explorer.exe /mingw64/bin/
# download http://luarocks.github.io/luarocks/releases/ luarocks.exe, luarocks-admin.exe move to C:\bin
luarocks config lua_interpreter lua.exe
luarocks config variables.LUA C:\bin\lua.exe
luarocks config variables.LUA_INCDIR C:\\msys64\\mingw64\\include
luarocks config variables.LUA_DIR C:\\bin
# set these in environment variables
# LUA_CPATH C:\Users\andre\AppData\Roaming/luarocks/lib/lua/5.4/?.dll
# LUA_PATH C:\Users\andre\AppData\Roaming/luarocks/share/lua/5.4/
# download sqlite precompilled binaries
# https://www.sqlite.org/2023/sqlite-dll-win64-x64-3420000.zip
luarocks install lsqlite3 SQLITE_INCDIR=C:\msys64\mingw64\include SQLITE_DIR=C:\bin\
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment