Follow these steps to install Lua 5.2.4 on macOS. These instructions are written for macOS High Sierra, but the steps are the same on previous (and future) versions of macOS as well:
- To download Lua 5.2.4, visit https://sourceforge.net/projects/luabinaries/files/5.2.4/.
- Click on the Tools and Executables link.
- Click on the lua-4.2.4_MacOS1011_bin.tar.gz link to start downloading Lua.
- Once the zip file has downloaded, unzip it. The archive should contain two files, lua52 and luac52:
- Create a new folder in your ~/Documents directory, and name this folder LUA. Move both lua52 and luac52 into this new directory: ...