I think that lua came as part of the macOS, however I noticed that it was version 5.1. I decided to update it and downloaded the current version of lua.I spent several hours messing with the instillation. I followed the html instructions closely and did indeed get a lua 5.3.4 directory etc installed on my iMac (OS 10.13.3). I could get lua to “open in the interactive mode ” in terminal if I went to the lua src directory and used the ./lua line command. Simply entering lua as a command, which worked before, resulted in a file not found error message.
I modified the PATH in my .profile to include the lua to source path and this worked fine, but it just felt wrong, and I did not see doing this in the html docs.
So I looked at the makefile file and looked at where things were supposed to go. In this instance, the INSTALL_TOP= path started out as /usr/local/. . . This path line will not work unless one uses sudo make install which will then put things in the right place (these directories are ‘owned” root / wheel.
After doing that and deleting the PATH line from .profile, entering lua on the command line works just fine. I think that this needs to be noted into the instructions.