编译openssl-3.0.3报错

Can't locate IPC/Cmd.pm in @INC (@INC contains:

/home/nginx/openssl-3.0.3/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 .

/home/nginx/openssl-3.0.3/external/perl/Text-Template-1.56/lib) at

/home/nginx/openssl-3.0.3/util/perl/OpenSSL/config.pm line 18.

BEGIN failed--compilation aborted at /home/nginx/openssl-3.0.3/util/perl/OpenSSL/config.pm line 18.

Compilation failed in require at /home/nginx/openssl-3.0.3/Configure line 23.

BEGIN failed--compilation aborted at /home/nginx/openssl-3.0.3/Configure line 23.

报错原因缺少IPC/Cmd.pm,需要安装这个模块

解决方法

1.安装perl-CPAN

yum install -y perl-CPAN

CPAN(Comprehensive Perl Archive Network:全面的Perl存档网络)是查找任何Perl有关的东西的中心仓库,其作用是让使用者容易从CPAN下载、安装、更新及管理其他在CPAN上的Perl程式。

2.进入perl shell中

perl -MCPAN -e shell

现在您需要选择您的CPAN镜像站点。您可以让我为您挑选镜子,您可以从

列表中选择它们,或者您可以手工输入它们。在这里选择yes 可能会失败,失败后可以手动输入阿里云的镜像https://mirrors.aliyun.com/CPAN/

3.安装缺少的模块

cpan[1]> install IPC/Cmd.pm

安装成功后,重新编译OpenSSL即可

./config

查看原文