Installing Lua on macOS

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:

  1. To download Lua 5.2.4, visit
  2. Click on the Tools and Executables link.
  3. Click on the lua-4.2.4_MacOS1011_bin.tar.gz link to start downloading Lua.

  1. Once the zip file has downloaded, unzip it. The archive should contain two files, lua52 and luac52:
  1. Create a new folder in your ~/Documents directory, and name this folder LUA. Move both lua52 and luac52 into this new directory: ...

Get Lua Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.