May 12, 2021 Lua
Installing Lua on Linux and Mac is as simple as downloading the source package and unziwing the compilation at the terminal, which is installed in version 5.3.0:
curl -R -O http://www.lua.org/ftp/lua-5.3.0.tar.gz tar zxf lua-5.3.0.tar.gz cd lua-5.3.0 make linux test make install
curl -R -O http://www.lua.org/ftp/lua-5.3.0.tar.gz tar zxf lua-5.3.0.tar.gz cd lua-5.3.0 make macosx test make install
Next we create a helloworld .lua:
print("Hello World!")
Follow these commands:
$ lua helloWorld
The output is:
Hello World!
Under window you can use an IDE environment called "SciTE" to execute the lua program at the download address:
Once installed, you can write and run Lua programs in that environment.
You can also use LuaDist: You can also use LuaDist: http://luadist.org/
If the installation is wrong: lua.c:80:31: fatal error: readline/readline.h: No such file or directory
Workaround: The libreadline-dev dependency package is missing
centos system: yum install readline-devel
debian system: apt-get install libreadline-dev