gpt4 book ai didi

php - 64 位 Linux/Ubuntu 和 openssl 问题(无法读取符号 : Bad value)

转载 作者:IT王子 更新时间:2023-10-29 01:13:44 24 4
gpt4 key购买 nike

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

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

./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 本身中正确搜索。其中一个相关主题已经回答了这个问题。 relocation R_X86_64_32 against a local symbol' error

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

./config enable-shared

然后我必须重新安装 cURL

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

然后我不得不重新安装 PHP

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

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

关于php - 64 位 Linux/Ubuntu 和 openssl 问题(无法读取符号 : Bad value),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18098258/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com