php - cURL 出现 SSL 依赖错误 libssl.so Ubuntu 32 位中需要 libcrypto.so

标签 php curl ssl openssl ubuntu-10.10

当我使用命令安装 openssl、curl 和 PHP 时,我的 64 位 Ubuntu 没有任何问题

OpenSSL

./configure enable-shared

curl

./configure --with-ssl=/usr/local/ssl --with-zlib

PHP

./configure .... --with-openssl --with-curl ....

但是在我的 32 位 Ubuntu 中,当我运行时,安装停止在 cURL 级别

make

命令

这是我得到的错误

/usr/bin/ld: warning: libssl.so.1.0.0, needed by ../lib/.libs/libcurl.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libcrypto.so.1.0.0, needed by ../lib/.libs/libcurl.so, not found (try using -rpath or -rpath-link)

我浏览了/usr/local/ssl 目录,确实找到了据称丢失的两个文件。我不知道这里发生了什么事。救命!

最佳答案

我发现了这个问题,我太愚蠢了,竟然忽略了 cURL 的网站文档。 我所要做的就是在配置之前传递运行时链接器的环境变量以使用共享库。

env LDFLAGS=-R/usr/local/ssl/lib ./configure --with-ssl --with-zlib

..它工作没有任何问题。我现在甚至在 Ubuntu 32 位中也支持 https。 这是文档链接 http://curl.haxx.se/docs/install.html

关于php - cURL 出现 SSL 依赖错误 libssl.so Ubuntu 32 位中需要 libcrypto.so,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18124658/

相关文章:

php - 通过 str_replacing 输出缓冲区中的内容将 php 页面中的所有非 ssl 引用转换为 ssl 是一种好习惯吗?

php - 哪种类型的输入最不容易受到攻击?

http - 使用 curl 时在 meteorjs 中发布数据

php - 如何获取javascript转换后的html源代码?

php - 为远程网页保存 cookie

java - CURL 传递 SSL 证书和密码

ssl - 当 ghost 安装在子目录中时,如何强制 Ghost 的管理页面成为 SSL 服务器?

ssl - Erlang Cowboy SSL 示例

php - 如何使用 PHP 从数组中去除空格?

php - 将html内容保存到mysql数据库中