欢迎来到云服务器

Directadmin Linux面板

卷曲编译错误:在创建共享对象时,无法使用针对“本地符号”的重定

如果在使用64位系统进行卷曲编译期间出现以下错误:

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/libssl.a(s2_clnt.o):
          relocation R_X86_64_32 against `a local symbol' can not be used when making
          a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/libssl.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

这意味着配置需要改变。 通常,对于这样的-fPIC错误,最好的方法是重新编译源库来解决问题,然后以相同的方式重新编译curl。 但是,在这种情况下,原因是libssl.a,它是操作系统发行版的一部分,所以最好避免这种情况,并用逆向代替所有内容。
 
在这种情况下,解决方案是将curl设置为不使用fPIC或共享库。
编辑构建脚本。 在doCURL部分中,找到以下行:

./configure --disable-file

并将其更改为:

./configure --disable-file --without-pic --disable-shared

保存/退出。
然后输入:

./build curl

然后就会编译curl。
腾讯云代理

Copyright © 2003-2021 MFISP.COM. 国外vps服务器租用 梦飞云服务器租用 版权所有 粤ICP备11019662号