- 下载最新版的lua请点击,然后解压
- 运行“终端”进入到该文件夹下 ,主要是cd 【文件夹名】
- 在“终端”输入 make macosx (回车)
- 在“终端”输入 make test (回车)
- 然后再输入“sudo make install”命令,会要求输入Password: 输入相应密码(你的密码),然后回车就自动安装了
待安装完成后可输入lua -v,回车就会看到 :Lua 5.2.0 Copyright (C) 1994-2011 Lua.org, PUC-Rio
OK ,已经安装成功!
然后你可以键入lua 开始lua之旅!
$ cd /Volumes/Data/Tools/lua-5.2.3 $ make macosx src/lua -v Lua 5.2.3 Copyright (C) 1994-2013 Lua.org, PUC-Rio $ sudo make install Password: cd src && mkdir -p /usr/local/bin /usr/local/include /usr/local/lib /usr/local/man/man1 /usr/local/share/lua/5.2 /usr/local/lib/lua/5.2cd src && install -p -m 0755 lua luac /usr/local/bin cd src && install -p -m 0644 lua.h luaconf.h lualib.h lauxlib.h lua.hpp /usr/local/include cd src && install -p -m 0644 liblua.a /usr/local/lib cd doc && install -p -m 0644 lua.1 luac.1 /usr/local/man/man1 $ lua -v Lua 5.2.3 Copyright (C) 1994-2013 Lua.org, PUC-Rio
时间: 2024-10-05 04:58:45