解决 Mac OS X 下 openrestry 编译报错 symbol(s) not found for architecture x86_64

来源:互联网 发布:摄影书籍推荐 知乎 编辑:程序博客网 时间:2024/05/29 13:21

先看一下网上的解决方案吧。。。。
http://blog.csdn.net/isuker/article/details/51284979。产生错误的原因是 nginx 在调用 openssl 的源码编译时, 调错了 configure 文件, 最终没能正确编译出需要的 openssl x86_64 库文件。
但是却无法解决问题,再看看官网是如何安装的:
http://openresty.org/cn/installation.html

结合两者,原来是可以自己手动指定openssl的库文件(lib)和头文件(inclide)的啊。。。。首先安装好openssl和pcre(可以用brew安装)

好吧,终极解决方案:
./configure \
–prefix=/usr/local/openresty \
–with-cc-opt=”-I/usr/local/opt/openssl/include/ -I/usr/local/opt/pcre/include/” \
–with-ld-opt=”-L/usr/local/opt/openssl/lib/ -L/usr/local/opt/pcre/lib/” \
–with-pcre-jit \
–with-ipv6 \
–with-http_realip_module \
–with-http_ssl_module \
–with-http_stub_status_module \
-j8

0 0
原创粉丝点击