ref: https://www.lua.org/home.html
Lua is a powerful, efficient, lightweight, embeddable scripting language.
It supports procedural programming, object-oriented programming, functional programming, data-driven programming, and data description.
Installation
Linux, Ubuntu 22.04
$ sudo apt install lua5.4 build-essential libreadline-dev liblua5.4-dev -y
### try lua interactive shell
$ lua
>
### quit the interactive shell
> os.exit()
Package Management, LuaRocks
Link: https://luarocks.org/
LuaRocks is the package manager for Lua modules.
$ mkdir -p luarocks && cd $_
$ wget https://luarocks.org/releases/luarocks-3.9.1.tar.gz
$ tar zxpf luarocks-3.9.1.tar.gz
$ ./configure && sudo make && sudo make install
Verify
$ luarocks --version
/usr/local/bin/luarocks 3.9.1
LuaRocks main command-line interface
System Environment Variables
$ eval "$(luarocks path)"
ref: https://stackoverflow.com/questions/47004243/module-installed-by-luarocks-not-found
Install Package
$ luarocks install http --local
FAQ
Error: Failed installing dependency: https://luarocks.org/cqueues-20200726.54-0.src.rock - Could not find header file for CRYPTO
No file openssl/crypto.h in /usr/local/include
No file openssl/crypto.h in /usr/include
You may have to install CRYPTO in your system and/or pass CRYPTO_DIR or CRYPTO_INCDIR to the luarocks command.
Example: luarocks install cqueues CRYPTO_DIR=/usr/local
$ sudo apt install libssl-dev -y
ref: https://stackoverflow.com/questions/71962737/cant-install-http-module-with-luarocks-on-ubuntu
Photo by Tsvetoslav Hristov on Unsplash