如何使用新的OpenSSL库编译PHP [英] How to compile PHP with new OpenSSL library

查看:93
本文介绍了如何使用新的OpenSSL库编译PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用OpenSSL编译PHP.只需配置--with-openssl=/usr,即可与默认的OpenSSL库0.9.6配合使用.

I am trying to compile PHP with OpenSSL. That works with the default OpenSSL library 0.9.6 by simply configuring with --with-openssl=/usr.

但是,我已经安装了一个新的OpenSSL库1.0.0,我希望以此来编译PHP.该库位于/usr/local/ssl/bin.

However, I have installed a new OpenSSL library 1.0.0 which I would like to compile PHP with. This library lives in /usr/local/ssl/bin.

不幸的是,这不起作用:

That unfortunately does not work:

configure: error: Cannot find OpenSSL's <evp.h>

如何使用新的OpenSSL库编译PHP?

How can I compile PHP with the new OpenSSL library?

推荐答案

通过重新编译curl修复了它,因为curl的编译版本也使用了旧的openssl lib

fixed it by recompiling curl as the compiled version of curl was also using the old openssl lib

sudo ./configure -disable-shared -with-ssl=/usr/local/ssl

编译curl之后,还要再次编译php --with-openssl =/usr,phpinfo告诉我它正在使用新的openssl lib.

After compiling curl, also compiled php again --with-openssl=/usr and phpinfo tells me it is using the new openssl lib.

这篇关于如何使用新的OpenSSL库编译PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆