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

标签 php linux openssl 64-bit lamp

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

我运行的是 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/

相关文章:

linux - 用两个程序读取一个串口 : Python 3

ruby - Ruby 与 Elixir 中的 OpenSSL 随机字节

ssl - Mosquitto SSL 证书验证失败

php - Laravel Eloquent 在哪里替换和比较

php - 连接 php 时 MySql 运行缓慢。与工作台连接时工作速度很快

linux - 从一个系统无密码登录多台 linux 机器的 Shell 脚本

c++ - 应用商店应用中的 OpenSSL

PHP字符串不包含

php - 无法在 Laravel 中迁移文件

c - 在 C 中获取键盘中断