- Lua Quick Start Guide
- Gabor Szauer
- 359字
- 2021-08-05 10:30:32
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:
- To download Lua 5.2.4, visit https://sourceforge.net/projects/luabinaries/files/5.2.4/.
- Click on the Tools and Executables link.
- Click on the lua-4.2.4_MacOS1011_bin.tar.gz link to start downloading Lua.
- Once the zip file has downloaded, unzip it. The archive should contain two files, lua52 and luac52:

- Create a new folder in your ~/Documents directory, and name this folder LUA. Move both lua52 and luac52 into this new directory:
- Rename lua52 to just lua.
- Launch a Terminal window. The Terminal app is located at /Applications/Utilities/Terminal.app. You can also simply type Terminal into the universal search on macOS.
- With the new Terminal window open, type sudo nano /etc/paths and hit Enter. You will be asked for your password; this is the password for your user account. The password will not show up as you type it. After the password is entered, nano will open; nano is a Terminal-based text editor. You should see something similar to the following window:

- You can navigate the type cursor with the arrow keys. Don't worry if your paths file (the file we are editing) already has text in it. We will be adding a new entry into this file; where in the file you add the new entry does not matter. On a new line, type ~Documents/LUA:

- Press Ctrl + X to exit nano. The program will ask you if you want to save the changes you have made to the file. Press Y to save changes.
- Nano will ask you to confirm the filename. Just hit Enter to accept the default path.
- In order for the changes made in the paths to take effect, you must restart the Terminal app. To do this, right-click on the Terminal icon in your macOS dock and select Quit. Then, launch a new Terminal window.
- In the new Terminal window, type lua -v. If everything is set up correctly, the Terminal should print out the installed version of Lua (5.2.4):

推薦閱讀
- DB2 V9權威指南
- Flutter開發實戰詳解
- Python從菜鳥到高手(第2版)
- Unity Virtual Reality Projects
- Selenium Design Patterns and Best Practices
- Kali Linux Wireless Penetration Testing Beginner's Guide(Third Edition)
- The HTML and CSS Workshop
- C語言程序設計同步訓練與上機指導(第三版)
- Apache Mahout Clustering Designs
- QGIS By Example
- Terraform:多云、混合云環境下實現基礎設施即代碼(第2版)
- C語言開發基礎教程(Dev-C++)(第2版)
- Web前端應用開發技術
- 移動互聯網軟件開發實驗指導
- Spring+Spring MVC+MyBatis從零開始學