【问题标题】:Error installing Passenger with nginx on OS X Mountain Lion在 OS X Mountain Lion 上使用 nginx 安装乘客时出错
【发布时间】:2013-01-21 17:01:39
【问题描述】:

所以我关注了这个tutorial,大约在编译 nginx 的一半时,“看起来好像出了点问题”。

所以,我已经安装并运行了 RVM,并且还安装了Passenger gem。我还使用 Homebrew 安装了 nginx,它也可以。

那么,我试试:

rvmsudo `which passenger-install-nginx-module`

我找到了here。

当提示我是否要安装新版本的 nginx,或者重新编译支持乘客的 Homebrew 时,我选择选项 2。当它询问源代码在哪里时,输入:

/Library/Caches/Homebrew/nginx-1.2.6

(我对下载进行了 tar 处理,并检查了该目录中的所有内容是否存在且正确。)

然后,当它问我在哪里安装新的重新编译的 nginx 时,我说和旧的目录相同:

/usr/local/Cellar/nginx/1.2.6/sbin

我将多余的参数留空,然后按两次回车。

它运行了几分钟,开始编译和安装 nginx,但随后失败。这是最后几行:

objs/ngx_modules.o \
    /Users/alex/.rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/ext/nginx/../common/libpassenger_common.a /Users/alex/.rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/ext/nginx/../common/libboost_oxt.a -lstdc++ -lpthread -lm -lpcre -lssl -lcrypto -lz
Undefined symbols for architecture x86_64:
  "_pcre_free_study", referenced from:
      _ngx_pcre_free_studies in ngx_regex.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[1]: *** [objs/nginx] Error 1
make: *** [build] Error 2
--------------------------------------------

It looks like something went wrong

Please read our Users guide for troubleshooting tips:

   /Users/alex/.rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/doc/Users guide Nginx.html

If that doesn't help, please use our support facilities at:

   https://www.phusionpassenger.com

We'll do our best to help you.

我检查了 nginx 没有运行,我还尝试卸载 Homebrew 版本的 nginx,使用默认值重新运行脚本,但它仍然失败。

我安装了带有最新版本 XCode 和命令行实用程序的 Mountain Lion。有谁知道可能是什么问题?

【问题讨论】:

    标签: nginx rvm passenger homebrew failed-installation


    【解决方案1】:

    它最终成为pcre 的问题。我只是跑了

    brew update pcre
    

    然后使用与以前相同的选项再次运行安装程序,并且成功了。

    【讨论】:

    • 这解决了问题吗?应该是brew upgrade pcre,可能。我尝试升级 pcre,但 Homebrew 报告 pcre-8.32 是最新的并且已安装在我的机器中。
    猜你喜欢
    • 1970-01-01
    • 2023-04-02
    • 2012-10-21
    • 1970-01-01
    • 2013-01-02
    • 2013-01-27
    • 2013-09-24
    • 1970-01-01
    • 2013-06-17
    相关资源
    最近更新 更多