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.
因此,在对这个问题做了一些详尽的研究之后,我仍然感到困惑。我正在运行Debian Wheezy,我试图让curl支持ssl,但它显然拒绝这么做。我试图删除所有的OpenSSL和Curl的痕迹。然后使用apt-get安装OpenSSL,它安装“OpenSSL 1.0.1e”。然后我试着从源代码中编译curl,也许认为apt-get只是在安装curl时很傻。我试着用这个来配置。
./configure --with-ssl LDFLAGS="-ldl"
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.
因为它会传递一些其他的错误。如果没有LDFLAGS,我将在日志中得到它。配置。但正如我说的,使用LDFLAGS,我可以创建配置,但是当我去做的时候。嗯. .那是当所有的赫克似乎挣脱的时候,她不会安装。
/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
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构建OpenSSL。因此,我从系统中清除了OpenSSL,并尝试从源代码安装,选择安装版本,1.0.2从这个链接到https://www.openssl.org/source/openssl-1.0.2.tar.gz。
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.
这实际上很好,我确保包含了-fPIC标志。然后我又重新安装了Curl,最终还是得到了这个错误。这是奇怪的。所以现在我坐在这里抓我的头。我已经卸载、重新安装、重新编译和安装,并且完成了所有我能想到的事情,而且我仍然很难缠。
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.
对不起,如果我今晚的格式不太好,对我来说太迟了。但如果有人能帮我一把,我将不胜感激。
1 个解决方案
#1
2
/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
Rebuild your local copy of OpenSSL with -fPIC
. The local copy is the one located in /usr/local/ssl/lib/
.
使用-fPIC重建本地的OpenSSL副本。本地副本位于/usr/local/ssl/lib/中。
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.
我也在Fedora上看到过这个问题。有时您可以用export CFLAGS=-fPIC来修复它。其他时候,您必须修改Makefile.org,以便它的当前。
#1
2
/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
Rebuild your local copy of OpenSSL with -fPIC
. The local copy is the one located in /usr/local/ssl/lib/
.
使用-fPIC重建本地的OpenSSL副本。本地副本位于/usr/local/ssl/lib/中。
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.
我也在Fedora上看到过这个问题。有时您可以用export CFLAGS=-fPIC来修复它。其他时候,您必须修改Makefile.org,以便它的当前。