1,准备好openssl
https://www.openssl.org/source/old/1.0.2/openssl-1.0.2u.tar.gz
2,安装perl
https://platform.activestate.com/tangxing806/ActivePerl-5.28/distributions
3,打开vs2019 开发人员命令行提示符,执行
perl Configure no-shared no-asm VC-WIN32 --debug --prefix=C:\OpenSSL
ActivePerl-5.28.1.XXXX.msi安装后,命令行执行cpan,会出现如下提示而无法继续。
Can't locate Win32/Console.pm in @INC (you may need to install the Win32::Console module) (@INC contains: C:\Perl64\site\lib C:\Perl64\lib) at C:\Perl64\lib/ActivePerl/Config.pm line 400.
解决办法,修改C:\Perl64\site\lib\ActivePerl\Config.pm,屏蔽这个函数,大约在400行左右:
# Prevent calling Win32::Console::DESTROY on a STDOUT handle
#my $console;
sub _warn {
# my($msg) = @_;
# unless (-t STDOUT) {
# print "\n$msg\n";
# return;
# }
# require Win32::Console;
# unless ($con