当我用brew安装lua51时,它无法运行该命令。但是,当我只安装lua (默认情况下安装了Lua5.2)时,lua命令就能工作了。
我试过brew链接,但这表明lua51已经链接了。
这是一份笔录
$ brew install lua (master)
Updating Homebrew...
....... Install output .......
/usr/local/Cellar/lua/5.2.4_4: 144 files, 705.5KB
$ lua (master)
Lua 5.2.4 Copyright (C) 1994-2015 Lua.org, PUC-Rio
>
$ brew uninstall lua (master)
Uninstalling /usr/local/Cellar/lua/5.2.4_4... (144 files, 705.5KB)
$ lua (master)
zsh: command not found: lua
$ brew install lua51 (master)
==> Downloading https://homebrew.bintray.com/bottles/lua@5.1-5.1.5_4.el_capitan.bottle.tar.gz
....... Install output .......
/usr/local/Cellar/lua@5.1/5.1.5_4: 136 files, 702.2KB
$ lua (master)
zsh: command not found: lua发布于 2017-05-04 20:42:03
我下载了https://homebrew.bintray.com/bottles/lua@5.1-5.1.5_4.el_capitan.bottle.tar.gz并看到它包含
./5.1.5_4/bin/lua-5.1
./5.1.5_4/bin/lua5.1 -> lua-5.1因此,您需要运行lua-5.1或lua5.1,而不是普通的lua。
https://stackoverflow.com/questions/43790375
复制相似问题