ubnutu server下openssl源码的编译与安装(CVE-2021-3712,libssl.so.3: cannot open shared object file)

测试服务器ubuntu server 20LTS

openssl ubuntu原版本号

OpenSSL 1.1.1f 31 Mar 2020

拉源码,耗时两分钟(测试环境)

git clone git://git.openssl.org/openssl.git

预编译,耗时十几秒

./Configure

编译,耗时五分钟

make

测试

Result: PASS

编译,耗时三分钟

sudo make install

openssl 版本号

OpenSSL 3.1.0-dev (Library: OpenSSL 3.1.0-dev )

遇到的错误:

openssl: error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory.

ln -s libssl.so.3 libssl.so

export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64

sudo ldconfig

//houyawei

 

卸载make uninstall

下载源码(生产环境)

​
wget https://www.openssl.org/source/openssl-1.1.1l.tar.gz

tar -zxvf xxx

./config

make

make test

make install

​//houyawei

openssl 查看版本号

OpenSSL 1.1.1l 24 Aug 2021

参考链接:

公告-腾讯云腾讯云公告通知icon-default.png?t=L9C2https://cloud.tencent.com/announce/detail/1567compilation - Error while loading shared libraries: /usr/local/lib64/libssl.so.1.1 - Stack Overflowicon-default.png?t=L9C2https://stackoverflow.com/questions/42828083/error-while-loading-shared-libraries-usr-local-lib64-libssl-so-1-1

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值