安装错误 Tengine1.5.0 MAC OS X
@shudu 你好,想跟你请教个问题:
"_d2i_SSL_SESSION", referenced from:
_ngx_ssl_get_cached_session in ngx_event_openssl.o
"_d2i_X509_bio", referenced from:
_ngx_ssl_certificate in ngx_event_openssl.o
"_i2a_ASN1_INTEGER", referenced from:
_ngx_ssl_get_serial_number in ngx_event_openssl.o
"_i2d_SSL_SESSION", referenced from:
_ngx_ssl_get_session_id in ngx_event_openssl.o
_ngx_ssl_new_session in ngx_event_openssl.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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(14)
@xiaochen_w ./config输出信息
最后一行是Configured for darwin-i386-cc. 如果你是x86_64系统,最后要输出 Configured for darwin64-x86_64-cc才可以的,要不编译后生成的就是 32
@eyelee 你可以试试下面的方法:
$ export KERNEL_BITS=64
$ ./configure --prefix=/usr/locale/tengine --with-openssl=/Users/yinjun622/Desktop/openssl-1.0.1e --with-pcre=/Users/yinjun622/Desktop/pcre-8.33
$ make
这个问题应该是 openssl/config脚本猜对你的系统是64位,但是 会根据$KERNEL_BITS来判断是否开启x86_64编译,默认 是不开启的(很奇怪的设置,虽然会给你5秒时间停止编译并手动开启),所以你生成的openssl库文件是32位的,最后静态链接到tengine/nginx会出错。目前看来没有很好的方法把x86_64的参数传到openssl配置文件中 (openssl/config 猜测os架构,设置编译的参数是32位还是64位,默认是32位,然后调用openssl/Configure生成Makefile)
对于mac os x - x86_64 系统,提供另外一个办法(如果export KERNEL_BITS=64不生效的话)
进入tengine目录
$ ./configure
手动修改 objs/Makefile:
./config --prefix=/Users/xxx/Downloads/openssl-1.0.1e/.openssl no-shared no-threads
改成
./Configure darwin64-x86_64-cc --prefix=/Users/xxx/Downloads/openssl-1.0.1e/.openssl no-shared no-threads
$ make
---
(@eyelee 已用这种方法编译通过)不过有点hack,暂时先这样,后续要再想办法跟进修改
export KERNEL_BITS=64 貌似没什么作用,还是一样的错误~~
@eyelee 你可以试试下面的方法:
$ export KERNEL_BITS=64
$ ./configure --prefix=/usr/locale/tengine --with-openssl=/Users/yinjun622/Desktop/openssl-1.0.1e --with-pcre=/Users/yinjun622/Desktop/pcre-8.33
$ make
这个问题应该是 openssl/config脚本猜对你的系统是64位,但是 会根据$KERNEL_BITS来判断是否开启x86_64编译,默认 是不开启的(很奇怪的设置,虽然会给你5秒时间停止编译并手动开启),所以你生成的openssl库文件是32位的,最后静态链接到tengine/nginx会出错。目前看来没有很好的方法把x86_64的参数传到openssl配置文件中 (openssl/config 猜测os架构,设置编译的参数是32位还是64位,默认是32位,然后调用openssl/Configure生成Makefile)
你在 openssl目录下直接 ./config试试看最后输出的信息是什么 最后一行,另外uname -a输出信息也给一下看看
缺少openssl库,路径弄对没
nginx-1.5.3,使用如下配置参数也会报类似错误:
./configure --with-http_ssl_module --with-openssl=~/Downloads/openssl-1.0.1e
错误信息:
......
"_d2i_OCSP_RESPONSE", referenced from:
_ngx_ssl_stapling in ngx_event_openssl_stapling.o
_ngx_ssl_stapling_ocsp_handler in ngx_event_openssl_stapling.o
"_d2i_SSL_SESSION", referenced from:
_ngx_ssl_get_cached_session in ngx_event_openssl.o
"_i2a_ASN1_INTEGER", referenced from:
_ngx_ssl_get_serial_number in ngx_event_openssl.o
"_i2d_OCSP_REQUEST", referenced from:
_ngx_ssl_certificate_status_callback in ngx_event_openssl_stapling.o
"_i2d_OCSP_RESPONSE", referenced from:
_ngx_ssl_stapling in ngx_event_openssl_stapling.o
"_i2d_SSL_SESSION", referenced from:
_ngx_ssl_new_session in ngx_event_openssl.o
_ngx_ssl_get_session_id in ngx_event_openssl.o
"_sk_num", referenced from:
_ngx_ssl_stapling in ngx_event_openssl_stapling.o
"_sk_value", referenced from:
_ngx_ssl_stapling in ngx_event_openssl_stapling.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
uname -a输出信息是 Darwin tomoyos-MacBook-Pro.local 12.4.0 Darwin Kernel Version 12.4.0: Wed May 1 17:57:12 PDT 2013; root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64
请问你编译时的configure选项是什么样的?
pcre已经安装上去了,去掉openssl就没有问题。 ./configure --prefix=/usr/locale/tengine --with-openssl=/Users/yinjun622/Desktop/openssl-1.0.1e --with-pcre=/Users/yinjun622/Desktop/pcre-8.33 运行没有问题 make 运行报错
Hi,请把你的安装步骤描述一下?谢谢!
对于mac os x - x86_64 系统,提供另外一个办法(如果export KERNEL_BITS=64不生效的话)
进入tengine目录
$ ./configure
手动修改 objs/Makefile:
./config --prefix=/Users/xxx/Downloads/openssl-1.0.1e/.openssl no-shared no-threads
改成
./Configure darwin64-x86_64-cc --prefix=/Users/xxx/Downloads/openssl-1.0.1e/.openssl no-shared no-threads
$ make
---
(@eyelee 已用这种方法编译通过)不过有点hack,暂时先这样,后续要再想办法跟进修改