Centos7将openssl升级版本至 openssl-3.0.1
查看openssl当前版本号:
[root@syxk ~]# openssl version
OpenSSL 1.0.2k-fips 26 Jan 2017
官方下载:https://www.openssl.org/source/
[root@syxk opt]#wget https://www.openssl.org/source/openssl-3.0.1.tar.gz
[root@syxk opt]#tar -xf openssl-3.0.1.tar.gz
[root@syxk opt]#cd openssl-3.0.1
[root@syxk openssl-3.0.1]#mkdir /usr/local/ssl
[root@syxk openssl-3.0.1]#./config --prefix=/usr/local/ssl/
Can't locate IPC/Cmd.pm in @INC (@INC contains: /opt/openssl-3.0.1/util/perl /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . /opt/openssl-3.0.1/external/perl/Text-Template-1.56/lib) at /opt/openssl-3.0.1/util/perl/OpenSSL/config.pm line 18.
BEGIN failed--compilation aborted at /opt/openssl-3.0.1/util/perl/OpenSSL/config.pm line 18.
Compilation failed in require at /opt/openssl-3.0.1/Configure line 23.
BEGIN failed--compilation aborted at /opt/openssl-3.0.1/Configure line 23.
解决办法:
安装所关联的软件包和编译工具包
[root@syxk openssl-3.0.1]#yum install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker
[root@syxk openssl-3.0.1]#./config --prefix=/usr/local/ssl/
[root@syxk openssl-3.0.1]#make -j 4
[root@syxk openssl-3.0.1]#make install
[root@syxk openssl-3.0.1]#mv /usr/bin/openssl /usr/bin/openssl.old
[root@syxk openssl-3.0.1]#mv /usr/include/openssl/ /usr/include/openssl.old
[root@syxk openssl-3.0.1]#ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
[root@syxk openssl-3.0.1]#ln -s /usr/local/ssl/include/openssl /usr/include/openssl
[root@syxk openssl-3.0.1]#echo "/usr/local/ssl/lib64/" >> /etc/ld.so.conf
[root@syxk openssl-3.0.1]#ldconfig
[root@syxk openssl-3.0.1]#openssl version
OpenSSL 3.0.1 14 Dec 2021 (Library: OpenSSL 3.0.1 14 Dec 2021)
[root@syxk openssl-3.0.1]#openssl version -a
OpenSSL 3.0.1 14 Dec 2021 (Library: OpenSSL 3.0.1 14 Dec 2021)
built on: Fri Feb 25 06:51:37 2022 UTC
platform: linux-x86_64
options: bn(64,64)
compiler: gcc -fPIC -pthread -m64 -Wa,--noexecstack -Wall -O3 -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DNDEBUG
OPENSSLDIR: "/usr/local/ssl/ssl"
ENGINESDIR: "/usr/local/ssl//lib64/engines-3"
MODULESDIR: "/usr/local/ssl//lib64/ossl-modules"
Seeding source: os-specific
CPUINFO: OPENSSL_ia32cap=0xffba22035f8bffff:0x283
出处:https://www.cnblogs.com/syxk
^_^如果觉得这篇文章对你有小小的帮助的话,记得在右下角点个“推荐”哦,您的“推荐” 将是我最大的写作动力^_^。
本文版权归作者所有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文链接,否则保留追究法律责任的权利。