Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/60.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 乘客NGINX模块故障_Ruby On Rails_Nginx_Passenger - Fatal编程技术网

Ruby on rails 乘客NGINX模块故障

Ruby on rails 乘客NGINX模块故障,ruby-on-rails,nginx,passenger,Ruby On Rails,Nginx,Passenger,在某一点上,我已经在使用NGINX、Rails和Passenger的系统上运行良好 昨天我重新安装了乘客,现在乘客安装nginx模块失败 /Users/mgaughan/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/passenger-3.0.13/ext/nginx/../common/libpassenger_common.a /Users/mgaughan/.rbenv/versions/1.9.3-p125/lib/rub

在某一点上,我已经在使用NGINX、Rails和Passenger的系统上运行良好

昨天我重新安装了乘客,现在乘客安装nginx模块失败

    /Users/mgaughan/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/passenger-3.0.13/ext/nginx/../common/libpassenger_common.a /Users/mgaughan/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/passenger-3.0.13/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
这个问题昨天发布在ServerFault上,但我认为更可能在这里得到解答(如果这是一个问题,我很抱歉)

谢谢您的帮助。

我看到NGINX对此有一个已关闭的解决方案,但该解决方案对我不起作用

然而,我确实通过运行一个定制的安装让NGINX重新启动并与乘客一起运行。这显然是版本2及更高版本的兼容性问题

首先,我只是拉下了NGINX源代码(1.0.15)

在my/usr/local中

wget http://www.nginx.org/download/nginx-1.0.15.tar.gz nginx_source
Untar

然后运行乘客安装。选择选项2(定制安装)

在那里,它会提示您输入源代码在哪里,以及您希望将源代码安装在哪里

从那以后一切都很好,任何人都知道nginx2的任何实际修复,请让我知道

brew install pcre
当配置步骤还添加

--with-pcre --with-ipv6 --with-ld-opt=-L/usr/local/lib
它也使用ld opt作为自制,这不是完美的


还可以查看

是否安装了libpcre?您是否启用了它?我正在运行Mac OS,并通过brew安装了pcre…我找不到libpcre(至少在brew中找不到)。如果我有我需要的,我如何确保它已启用?问题可能是安装的pcre版本。很高兴你找到了工作很棒!非常感谢。我刚刚花了两个小时试图在MacOSX上构建它,您应该选择/usr/local作为安装目录though@mgaughan谢谢你,伙计,不过我添加了一个额外的选项——使用ld opt='-L/usr/local/lib'来配置以使其工作。另外,我正在使用黑客软件,我不知道它是否相关。你提到的
--with ld opt
标志为我解决了这个问题。
brew install pcre
--with-pcre --with-ipv6 --with-ld-opt=-L/usr/local/lib