我的系统是:osx ei capitan 10.11.1 (15B42)
从nginx官方网站下载 nginx-1.9.5.tar.gz
tar xzf nginx-1.9.5.tar.gz
cd nginx-1.9.5
./configure --prefix=/usr/local/nginx --without-http_rewrite_module --with-http_ssl_module
objs/src/http/modules/ngx_http_upstream_ip_hash_module.o \
objs/src/http/modules/ngx_http_upstream_least_conn_module.o \
objs/src/http/modules/ngx_http_upstream_keepalive_module.o \
objs/src/http/modules/ngx_http_upstream_zone_module.o \
objs/ngx_modules.o \
-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
Downloads/nginx-1.9.5 »
不带 --without-http_rewrite_module --with-http_ssl_module 可以安装成功,但我我需要支持https
求高手指点 ?
用--with-cc-opt和--with-ld-opt指定openssl头文件和库文件的路径
又或者用--with-openssl=/the/path/to/openssl/source/code/指定openssl源代码的路径
回复 @无名码农:非常感谢啊,弄好了回复 @leeyi:set是ngx_http_rewrite_module提供的指令回复 @leeyi:去掉--without-http_rewrite_modulemake通过了,但是nginx-t报错:[emerg]12964#0:unknowndirective"set"in/usr/local/nginx/conf/nginx.conf:71参考nginx.org/en/docs/configure.html./configure--prefix=/usr/local/nginx--without-http_rewrite_module--with-http_ssl_module--with-cc-opt="-I/usr/local/include"--with-ld-opt="-L/usr/local/lib"下载了最新版本openssl解压之后指定到了--with-openssl=包其他错误我本地openssl只用brew安装的最新版本
/usr/local/Cellar/openssl/1.0.2d_1
make之后还是报错,步骤和错误如下:
tarxzfnginx-1.9.5.tar.gz
cd nginx-1.9.5
./configure--prefix=/usr/local/nginx--without-http_rewrite_module--with-http_ssl_module--with-openssl=/Users/leeyi/Downloads/openssl-1.0.2d
"_i2d_SSL_SESSION",referencedfrom:
_ngx_ssl_new_sessioninngx_event_openssl.o
_ngx_http_upstream_save_round_robin_peer_sessioninngx_http_upstream_round_robin.o
"_sk_num",referencedfrom:
_ngx_ssl_session_cacheinngx_event_openssl.o
_ngx_ssl_staplinginngx_event_openssl_stapling.o
"_sk_value",referencedfrom:
_ngx_ssl_session_cacheinngx_event_openssl.o
_ngx_ssl_staplinginngx_event_openssl_stapling.o
ld:symbol(s)notfoundforarchitecturex86_64
clang:error:linkercommandfailedwithexitcode1(use-vtoseeinvocation)
make[1]:***[objs/nginx]Error1
make:***[build]Error2
看评价很多说升级了之后变卡功能不好用的
看了下自己的版本还是10.10.5还好
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。