Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passenger NGINX module Failing

At one point I've had everything running fine on my system with NGINX, Rails, and Passenger.

Yesterday I did a fresh install of Passenger, and now passenger-install-nginx-module fails.

    /.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/passenger-3.0.13/ext/nginx/../common/libpassenger_common.a /.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

This exact problem was posted yesterday on ServerFault, but I think it's more likely to be answered here (I apologize if that is a problem).

https://serverfault.com/questions/399304/cannot-install-phusion-passenger-3-0-13-with-nginx-1-2-1

Thanks for any help.

like image 393
mgaughan Avatar asked Jun 16 '12 16:06

mgaughan


2 Answers

I see NGINX has a ticket for this that has been closed, but the solution did not work for me.

I did, however, get NGINX up and running again with Passenger by running a customized installation. It's obviously a compatibility issue with versions 2 and up.

First I just pulled down the NGINX source (1.0.15).

In my /usr/local

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

Untar

 tar -xvz nginx-1.0.15.tar.gz

Then run the passenger installation. Choosing option 2 (Customized Instalation)

sudo passenger-install-nginx-module

There it prompts for where the source is /usr/local/nginx-1.0.15 and where you want it installed /usr/local/nginx (in my case).

Everything worked fine from there, anyone know of any real fixed for NGINX 2, please let me know.

like image 83
mgaughan Avatar answered Sep 17 '22 14:09

mgaughan


brew install pcre

when config step also add

--with-pcre --with-ipv6 --with-ld-opt=-L/usr/local/lib

it also use with-ld-opt as homebrew,it's not perfect.

also can take a look at http://wiki.nginx.org/InstallOptions

like image 20
Tiankui Avatar answered Sep 17 '22 14:09

Tiankui