CentOS7编译安装OpenSSL3.1
1.下载Openssl源码包
[root@localhost ~]# wget https://www.openssl.org/source/openssl-3.1.0.tar.gz
2.解压安装
[root@localhost ~]# tar -xvf openssl-3.1.0.tar.gz -C /usr/local/ [root@localhost ~]# cd /usr/local/openssl-3.1.0/ [root@localhost ~]# ./config --prefix=/usr/local/openssl
如果报错为: 缺少IPC/Cmd.pm模块
[root@localhost ~] # ./config --prefix=/usr/local/openssl Can't locate IPC/Cmd.pm in @INC (@INC contains: /root/Downloads/openssl-3.1.0/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 . /root/Downloads/openssl-3.1.0/external/perl/Text-Template-1.56/lib) at /root/Downloads/openssl-3.1.0/util/perl/OpenSSL/config.pm line 18. BEGIN failed--compilation aborted at /root/Downloads/openssl-3.1.0/util/perl/OpenSSL/config.pm line 18. Compilation failed in require at /root/Downloads/openssl-3.1.0/Configure line 23. BEGIN failed--compilation aborted at /root/Downloads/openssl-3.1.0/Configure line 23.
解决方法:
[root@localhost openssl-3.1.0]# yum install -y perl-CPAN [root@localhost openssl-3.1.0]# perl -MCPAN -e shell CPAN.pm requires configuration, but most of it can be done automatically. If you answer 'no' below, you will enter an interactive dialog for each configuration option instead. Would you like to configure as much as possible automatically? [yes] yes Warning: You do not have write permission for Perl library directories. To install modules, you need to configure a local Perl library directory or escalate your privileges. CPAN can help you by bootstrapping the local::lib module or by configuring itself to use 'sudo' (if available). You may also resolve this problem manually if you need to customize your setup. What approach do you want? (Choose 'local::lib', 'sudo' or 'manual')
标签:OpenSSL3.1,local,openssl,perl,CentOS7,编译,usr,3.1,root From: https://www.cnblogs.com/haoee/p/17391596.html