- check whether the local machine has installed Lua on the Mac OS terminal.
Last login: Thu Jul 10 07:54:48 on ttys000keshans-Mac-mini:~ keshan$ lua-bash: lua: command not found
2. If there is no official Lua website to download the latest code in the tar.gz format
Http://www.lua.org/download.html
3. refer to pages 8, 9, 10, and 11 of this document.
Http://media.wiley.com/product_data/excerpt/71/04700691/0470069171.pdf
The main content is to specify the platform when making
The correct method is to specify MacOSX
make macosxsudo make install
4. Check whether the installation is successful and the version number is correct.
keshans-Mac-mini:lua-5.2.3 keshan$ luaLua 5.2.3 Copyright (C) 1994-2013 Lua.org, PUC-Rio> message = [[It‘s a test string]]> print(message)It‘s a test string> keshans-Mac-mini:lua-5.2.3 keshan$ lua -vLua 5.2.3 Copyright (C) 1994-2013 Lua.org, PUC-Riokeshans-Mac-mini:lua-5.2.3 keshan$
5. view the Lua directory
keshans-Mac-mini:lua-5.2.3 keshan$ which lua/usr/local/bin/lua
Done