I installed gem Passenger which installed 3.0.13. Then I executed passenger-install-nginx-module which is what the Nginx instructions on http://www.modrails.com said to do. It installs the latest stable version which is 1.2.1 according to the Nginx official wiki page. I said to install Nginx to /usr/local/nginx (which is the default if you go to the nginx wiki website). I get the following errors:

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/server1/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd3.2.3/gems/passenger-3.0.13/doc/Users guide Nginx.html

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


We'll do our best to help you.

I have done searches for several hours trying to find a resolution. I tried the Google Group for Phusion Passenger but did not find anything. I do not know if there is a mismatch in version numbers or not. The documentation says nothing about this error.


I had the same problem, saw this question but posted on StackOverflow.

Check out my answer. https://stackoverflow.com/questions/11065037/passenger-nginx-module-failing/11067526#11067526

From SO:

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


 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.

  • I was able to get Nginx installed with no errors!! I saw the ticket that was opened and could not get it working either. This is why I submitted this question. I just have another question. I still have Apache pointing to port 80. I would like to point Nginx to 8080 or another port for now. Can I put the listen statement at the http level of the config file or can I just do listen at the server statement level? My plans are to eventually switch all our websites to Nginx. – Pamela Cook - LightBe Corp Jun 17 '12 at 16:16
  • Yeah just change the listen line in the server block. Wherever you installed nginx, open conf/nginx.conf and change listen 80; to listen 8080; – mgaughan Jun 17 '12 at 23:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.