Skip to content

Instantly share code, notes, and snippets.

@martin-eden
Last active March 3, 2024 01:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martin-eden/4d3d1677244234e6501654cb32316305 to your computer and use it in GitHub Desktop.
Save martin-eden/4d3d1677244234e6501654cb32316305 to your computer and use it in GitHub Desktop.
Lua 5.3 installation/removal

Download, build and install Lua 5.4.

Requirements: Linux, bash.

Last checked: 2024-02-07

Download, build and install

#!/bin/bash

# Download and install Lua interpreter.

# Last mod.: 2024-02-07
# Last check: 2024-02-07

# Pre-flight requirements
sudo apt install libc-dev
sudo apt install libreadline-dev

# Source code URL
url="https://www.lua.org/ftp/lua-5.4.6.tar.gz"

# Download and unpack
cd /tmp
curl -R -O $url
tar zxf $(basename $url)
cd $(basename $url .tar.gz)

# Install
sudo make clean linux-readline install

Test

lua

Uninstall

Easy way: change last line of script to sudo make uninstall.

More conscious way: go to /tmp/lua... and sudo make uninstall from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment