在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
1⃣️在Mac上安装Lua的运行环境再简单不过了,如果你的Mac Terminal上安装了Homebrew的话,只需要键入`brew install lua`即可。 longsl-mac:~ longsl$ brew install lua Updating Homebrew... ==> Auto-updated Homebrew! Updated 1 tap (homebrew/core). ==> Updated Formulae acpica erlang kubeprod rust aliyun-cli exploitdb libgweather sonar-scanner ask-cli freetype libpqxx sonarqube azure-cli glooctl micronaut terrahub babel gmsh opa tokei bzip2 grpcurl paket ucloud cargo-completion gxml phpunit xsimd clojure hadolint podofo ykpers cointop hamlib postgresql zurl convox helmfile proguard django-completion jboss-forge pushpin
==> Downloading https://homebrew.bintray.com/bottles/lua-5.3.5_1.mojave.bottle.t ######################################################################## 100.0% ==> Pouring lua-5.3.5_1.mojave.bottle.tar.gz ==> Caveats You may also want luarocks: brew install luarocks ==> Summary ???? /usr/local/Cellar/lua/5.3.5_1: 28 files, 274.5KB longsl-mac:~ longsl$ lua Lua 5.3.5 Copyright (C) 1994-2018 Lua.org, PUC-Rio > math.pi / 4 0.78539816339745 2⃣️假如你的Mac上没有安装上面提到的Homebrew软件,那也没关系,直接编译lua源代码库就可以了。
Take Lua 5.2 as example:
After that, you can see 'lua' binary under current dir. sudo cp lua /usr/bin/lua
参考:https://stackoverflow.com/a/5496362
|
请发表评论