1,准备好openssl
2,安装perl
3,打开vs2017 开发人员命令行提示符注意区分32位和64位,执行
perl Configure no-shared no-asm VC-WIN32 --debug --prefix=C:\OpenSSL
ActivePerl-5.26.3.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 ($console) {
# $console = Win32::Cons