The Googles turned up a blog post from Phusion about what appeared to be the same problem. Applying their suggested fix (downloading
pcre.h and copying it to
/usr/include) didn’t help, unfortunately.
I happened to stumble across a Github issue about a different nginx module that provided a tantalizing hint:
If the problem persists, please check that if you have multiple versions of PCRE installed in your system.
There was a version of pcre installed via Homebrew already on my system. I had apparently installed it for something I had since uninstalled, because I was able to remove it without complaint. Running the Passenger installer for nginx this time was more successful:
It looks like pcre installed via Homebrew confuses the Passenger installer; removing pcre allows the installer to download all the pieces it needs to a place it can find them.
Now, to see how it runs.
1、gem install passenger
Compiling and installing Nginx...
# sh ./configure --prefix='/opt/nginx' --with-http_ssl_module --with-http_gzip_static_module --with-cc-opt='-Wno-error' --add-module='/Users/xxxx/.rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.17/ext/nginx' --with-pcre='/Users/xxxx/Downloads/packages/pcre-8.32'