Nginx OpenSSL 库安装错误

Nginx OpenSSL 库安装错误

我在 Mac OS X 10.11 (El Capitan) 上运行,rvmsudo passenger-install-nginx-module在构建时遇到此错误:

-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

从我读到的内容来看,似乎存在库冲突,并且我有两个包含路径指向同一个库,或者 Nginx 无法找到正确的库。问题库似乎是 OpenSSL 库。我尝试重新安装 RVM 和 Passenger,但无济于事。

我能找到的唯一一篇非常相似的帖子是在 openresty这取决于 OpenSSL。

相关内容