加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

Lua for Mac环境搭建

发布时间:2020-12-14 21:45:21 所属栏目:大数据 来源:网络整理
导读: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). ==

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:?

  1. Open your Terminal.app
  2. wget?http://www.lua.org/work/lua-5.3.0-work3.tar.gz
  3. tar xvzf lua-5.3.0-work3.tar.gz
  4. cd lua-5.3.0-work3/src
  5. make macosx(I believe you have Xcode installed)

?

After that,you can see ‘lua‘ binary under current dir.

?sudo cp lua /usr/bin/lua

?

参考:https://stackoverflow.com/a/5496362

?

?

?

?

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读