【问题标题】:Lua is not working in Openresty on Mac OS XLua 在 Mac OS X 上的 Openresty 中不工作
【发布时间】:2014-03-12 04:24:07
【问题描述】:

我正在尝试在 Mac OS X 10.6 下安装 Openresty v.1.2.6.7。 我正在用 brew 安装 pcre 以满足要求 (pcre 是 8.32 版)并使用 pcre 目录运行配置脚本 指定和 --with-luajit 选项。

cd openresty-1.2.6.7

./configure --with-cc-opt="-I/usr/local/Cellar/pcre/8.32/include" \
            --with--ld-opt="-L/usr/local/Cellar/pcre/8.32/lib" |
            --with-luajit

我正在使用 Openresty 指南中给出的示例配置:

http://openresty.org/#GettingStarted

并尝试使用它启动 nginx,但我收到以下错误:

nginx: [emerg] unknown directive "content_by_lua"

我在 Ubuntu 中尝试了相同的步骤(对必备软件包进行了必要的更改并且工作正常)。任何建议都非常受欢迎。

【问题讨论】:

  • 这可能对你没有多大帮助,但就在昨天我发布了brew tap for openresty。它将内容保存在 brew 中,并使将来的更新变得容易。此外,二进制文件将被称为openresty,而不是nginx。
  • 听起来很有趣,我想它也会克服这个问题。我会试一试 :) 谢谢你的考虑

标签: nginx lua


【解决方案1】:

为什么不直接使用 Brew?

brew install openresty

仅此而已! :)

【讨论】:

【解决方案2】:

几天后,我找到了它。我用 brew 单独安装了 LuaJIT,并使用它的库和头文件来构建 openresty。

cd openresty-1.2.6.7

./configure --with-cc-opt="-I/usr/local/Cellar/pcre/8.32/include 
                           -I/usr/local/Cellar/luajit/2.01/luajit2.0/include" \
            --with--ld-opt="-L/usr/local/Cellar/pcre/8.32/lib
                            -L/usr/local/Cellar/luajit/2.01/luajit2.0/lib" \                
            --with-luajit

用

构建它
 make && make install 

成功了

【讨论】:

    猜你喜欢
    • 2015-08-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-01-11
    • 2011-06-02
    • 1970-01-01
    • 2015-12-01
    相关资源
    最近更新 更多