I am on Mac OS X 10.11 (El Capitan), ran rvmsudo passenger-install-nginx-module and when building I ran into this error:

-lstdc++ -lpthread -lm /tmp/passenger.1rb7py0/pcre-8.34/.libs/libpcre.a -lssl -lcrypto -lz
Undefined symbols for architecture x86_64:
  "_SSL_CTX_set_alpn_select_cb", referenced from:
      _ngx_http_ssl_merge_srv_conf in ngx_http_ssl_module.o
  "_SSL_CTX_set_next_protos_advertised_cb", referenced from:
      _ngx_http_ssl_merge_srv_conf in ngx_http_ssl_module.o
  "_SSL_select_next_proto", referenced from:
      _ngx_http_ssl_alpn_select in ngx_http_ssl_module.o
  "_X509_check_host", referenced from:
      _ngx_ssl_check_host in ngx_event_openssl.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [objs/nginx] Error 1
make: *** [build] Error 2

From what I’ve read, it looks like either there is a library conflict and I have two include paths pointing to the same library, or Nginx is unable to find the correct library. The problem library appears to be the OpenSSL library. I have tried reinstalling RVM and passenger to no avail.

The only other post I could find that was very similar was on openresty which depends on OpenSSL.

  • Based on the post you linked to, did you try running export KERNEL_BITS=64 before running rvmsudo passenger-install-nginx-module? – JakeGould Oct 9 '15 at 21:32
  • Yes I did with no luck. – Ethan Keller Oct 10 '15 at 4:43
  • I know these are ancient tips, but what about the suggestion here of compiling with the full path for passenger-install-nginx-module. Or try running which passenger-install-nginx-module and then run rvmsudo with that returned path. Seems like it’s an OpenSSL issue on your setup. Might need to install an updated version of OpenSSL from something like Homebrew and then try again. Even setting an explicit path to the new OpenSSL libraries. – JakeGould Oct 10 '15 at 4:52
  • How do I set an explicit path to the new OpenSSL libraries? – Ethan Keller Oct 12 '15 at 13:00

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.