Skip to main content
China-Pakistan Economic Corridor

4.2. Lua environment installation

Release time :2025-10-25 12:06:19 UTC

Page Views: 1 views

4.2.1. Install on Linux system #

It is very easy to install Lua on Linux & Mac. You only need to download thesource package and decompress and compile it on the terminal. Version 5.3.0 is used for installation in this article:

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

4.2.2. Install on Mac OS X system #

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, let’s create a HelloWorld.lua file, the code is as follows: