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

查看:502
本文介绍了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.

我正在运行一个64位的Ubuntu Linux服务器,该服务器上安装了LAMP堆栈,并且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 --with-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天全站免登陆