/usr/local/ssl/lib/libcrypto.a:无法读取符号:错误值 [英] /usr/local/ssl/lib/libcrypto.a: could not read symbols: Bad value

查看:587
本文介绍了/usr/local/ssl/lib/libcrypto.a:无法读取符号:错误值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,在今晚对这个问题进行了详尽的研究之后,我仍然感到困惑.我正在运行Debian Wheezy,并且尝试使curl支持ssl,但它显然拒绝这样做.我试图删除所有OpenSSL和Curl的痕迹.然后使用apt-get install OpenSSL,它会安装"OpenSSL 1.0.1e".然后我去尝试从源代码编译curl,以为apt-get只是在安装curl时变得愚蠢.我尝试使用此配置.

So after doing some exhaustive research tonight on this problem, I'm still stumped. I'm running Debian Wheezy and I'm trying to get curl to support ssl, which it just plainly refuses to do. I've tried to remove all traces of OpenSSL and Curl. Then use apt-get install OpenSSL, which installs "OpenSSL 1.0.1e". I then went and tried to compile curl from source, thinking maybe apt-get was just being silly with installing curl. I tried to configure using this.

./configure --with-ssl LDFLAGS="-ldl"

因为它将以其他方式传递一些错误.没有LDFLAGS,我将在日志中获取它. config.log 但是正如我说的那样,在启用LDFLAGS的情况下,我实际上可以创建配置,但是当我进行制作时……那好了,那时候所有的东西似乎都松散了并且她不会安装.

because it would pass some errors other wise. Without LDFLAGS I'll get this in my log. config.log But as I said, with LDFLAGS on, I'm able to actually create the config, but then when I go to make.. well.. that's when all heck seems to break loose and she won't install.

/usr/bin/ld: /usr/local/ssl/lib/libcrypto.a(ecp_nistz256.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/ssl/lib/libcrypto.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [libcurl.la] Error 1
make[2]: Leaving directory `/home/openssl/curl-7.27.0/lib'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/openssl/curl-7.27.0/lib'
make: *** [all-recursive] Error 1

经过研究,有人建议使用-fPIC构建OpenSSL.因此,我从系统中清除了OpenSSL,并尝试从源代码安装,选择从此链接

After some research, some people suggested building OpenSSL with -fPIC. SO I purged OpenSSL from the system and tried to install from source, choosing to install version, 1.0.2 from this link https://www.openssl.org/source/openssl-1.0.2.tar.gz

这实际上进行得很好,并且我确保包括-fPIC标志.然后,我再次去安装Curl,但仍然最终收到此错误..这很奇怪..所以现在我坐在这里挠头.我已经卸载,重新安装,重新编译,安装并完成了所有我能想到的事情,但我还是很困惑.

This actually went pretty well and I made sure to include the -fPIC flag. I then went to install Curl again and still ended up getting this error.. which was strange.. so now I'm sitting here scratching my head. I've uninstalled, reinstalled, recompiled and installed and done every mix of things I can think of and I'm still pretty darn stumped.

对不起,如果我今晚的格式化很糟糕,对我来说已经很晚了.但是,如果有人可以帮我,将不胜感激.

Sorry if my formatting is terrible tonight, it's rather late for me. But if anyone could give me a hand, it'd be much appreciated.

推荐答案

/usr/bin/ld: /usr/local/ssl/lib/libcrypto.a(ecp_nistz256.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/ssl/lib/libcrypto.a: could not read symbols: Bad value

使用-fPIC重建OpenSSL的本地副本.本地副本是位于/usr/local/ssl/lib/中的副本.

Rebuild your local copy of OpenSSL with -fPIC. The local copy is the one located in /usr/local/ssl/lib/.

我也在Fedora上看到了这个问题.有时您可以使用export CFLAGS=-fPIC进行修复.其他时候,您必须修改Makefile.org使其存在.

I've seen this issue on Fedora, too. Sometimes you can fix it with export CFLAGS=-fPIC. Other times you have to modify Makefile.org so its present.

这篇关于/usr/local/ssl/lib/libcrypto.a:无法读取符号:错误值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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