安装openssl的时候出现了下面的问题,试了n种方法,还是有编译错误,有装成功过的朋友们,麻烦看一下,谢谢

[复制链接]
查看11 | 回复1 | 2021-1-27 05:27:21 | 显示全部楼层 |阅读模式
/usr/bin/ld:libcrypto.a(cbc128.o):relocationR_X86_64_32against`alocalsymbol'cannotbeusedwhenmakingasharedobject;recompilewith-fPIC
libcrypto.a(cbc128.o):couldnotreadsymbols:Badvalue
collect2:ld返回1
make[4]:***[link_a.gnu]错误1
make[4]:Leavingdirectory`/home/source/openssl-1.0.0s'
make[3]:***[do_linux-shared]错误2
make[3]:Leavingdirectory`/home/source/openssl-1.0.0s'
make[2]:***[libcrypto.so.1.0.0]错误2
make[2]:Leavingdirectory`/home/source/openssl-1.0.0s'
make[1]:***[shared]错误2
make[1]:Leavingdirectory`/home/source/openssl-1.0.0s/crypto'
make:***[build_crypto]错误1
上面是make以后出现的错误。
下面是执行时的命令:
./config--prefix=/home/opensslenable-shared
甚至执行的时候加上了CFLAGS="-O3-fPIC"以后再make的时候还是会出现上面的错误。

分 -->
回复

使用道具 举报

千问 | 2021-1-27 05:27:21 | 显示全部楼层
youmightwanttofindoutwhyopensslwaslinkedwiththestaticlibrary:libcrypto.a,insteadoflibcrypto.so
ifthesharedlibraryismissing,getitinstalled.
otherwise,recompilelibcryptowith-fPIC
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行