Question

So I'm following this tutorial, and about half way through compiling nginx, 'It looks like something went wrong'.

So, I have RVM installed and working, and I also have the Passenger gem installed. I also installed nginx using Homebrew, which also works.

So then, I try:

rvmsudo `which passenger-install-nginx-module`

Which I found here.

When prompted if I want to install a new version of nginx, or recompile the Homebrew one with Passenger support, I choose option 2. When it asks where the source code is, put in:

/Library/Caches/Homebrew/nginx-1.2.6

(I tar'd the download, and I've checked that everything is present and correct in that directory.)

Then, when it asks me where to install the new recompiled nginx, I say the same directory as the old one:

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

I leave the extra arguments blank, and hit enter twice.

It runs for a few minutes, starts compiling and installing nginx, but then fails. Here's the last few lines:

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.

I've checked that nginx is not running, and I've also tried uninstalling the Homebrew version of nginx, re-running the script with the defaults, and it still fails on me.

I have Mountain Lion installed with the most recent version of XCode and Command Line Utilities. Does anyone know what the problem might be?

Was it helpful?

Solution

It ended up being a problem with pcre. I simply ran

brew update pcre

And ran the installer again with the same options as before, and it worked.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top