64 位 Linux/Ubuntu 和 openssl 问题(无法读取符号:错误值) [英] 64 bit Linux/Ubuntu and openssl issue (could not read symbols: Bad value)

查看:23
本文介绍了64 位 Linux/Ubuntu 和 openssl 问题(无法读取符号:错误值)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通常我会进行大量搜索和阅读以解决我的问题,但对于这个特定问题,它的效率很低.

Normally I search a lot and read a lot to fix my issues, but for this particular problem, it has been pretty unproductive.

我正在运行安装了 LAMP 堆栈的 64 位 Ubuntu Linux 服务器,并且在 libcurl 不支持 SSL 时遇到了问题,而操作系统二进制文件确实支持 SSL.PHP 就是无法读取它.当我搜索解决方案并尝试执行以下操作以在安装 PHP 时启用 ssl 支持时,我遇到了问题..

I am running a 64bit Ubuntu Linux server on which I installed LAMP stack, and had problem with libcurl not having SSL support, while the OS binary does have SSL support. The PHP just cannot read it. When I searched for solutions and tried doing the following to enable ssl support while installing PHP, I got the problem..

./configure .... --with-openssl
...
....
/usr/bin/ld: ext/standard/.libs/info.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
ext/standard/.libs/info.o: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** [libphp5.la] Error 1

所以,它突然退出了.我尝试做 --enable-shared --without-pic 参数无济于事.

So, it quit suddenly. I tried doing --enable-shared --without-pic arguments to no avail.

推荐答案

好的,抱歉没有在 SO 本身中正确搜索.相关主题之一对此问题给出了答案.针对本地符号错误重新定位 R_X86_64_32

Okay, sorry for not search properly in SO itself. One of the related topics had an answer to this problem. relocation R_X86_64_32 against a local symbol' error

这次我所要做的就是在配置期间使用 enable-shared 选项重新安装 openssl

All I had to do was do a fresh install of openssl this time with enable-shared option during configure

./config enable-shared

然后我不得不重新安装 cURL

Then I had to do a fresh install of cURL

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

然后我不得不重新安装 PHP

Then I had to do a fresh install of PHP

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

.. 就是这样.PHP cURL 扩展支持 SSL.

..and that did it. The PHP cURL extension has SSL support.

这篇关于64 位 Linux/Ubuntu 和 openssl 问题(无法读取符号:错误值)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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