Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 10: Error: 501 Can't load c8c63bf2.xs.dll for module Net::SSLeay: load_file:The specified module could not be found (LWP::Protocol::https not installed) #21

Closed
hakonhagland opened this issue Jun 19, 2020 · 2 comments

Comments

@hakonhagland
Copy link

I am trying to create an .exe from the following Perl script:

use strict;
use warnings;
use LWP::UserAgent;

my $ua = LWP::UserAgent->new();
my $res = $ua->get( 'https://metacpan.org/pod/pp');
if ($res->is_success) {
  print "ok\n";
}
else {
  die $res->status_line;
}

On Windows 10, with Strawberry Perl, perl version 5.30.1, running pp from command prompt:

pp -o p4.exe -x p.pl

produces an executable p4.exe that runs fine on the current machine and produces output ok. When I upload the p4.exe to another windows 10 machine that does not have perl installed and run it I get output:

501 Can't load 'C:\Users\hakon\AppData\Local\Temp\par-68616b6f6e\cache-2fc254075e68b8cca263637e29f9a640f6669c6a\c8c63bf2.xs.dll' for module Net::SSLeay: load_file:The specified module could not be found (LWP::Protocol::https not installed) at script/p.pl line 12.

If I run pp with verbose option, I can see that it packages LWP::Protocol::https:

pp -o p4.exe -x -vv p.pl | findstr Protocol/http
C:\Strawberry\perl\site\bin/pp: ... adding <string> as lib/LWP/Protocol/http.pm
C:\Strawberry\perl\site\bin/pp: ... adding <string> as lib/LWP/Protocol/https.pm

Any ideas what is going on?

See also this issue on stackoverflow.com

@hakonhagland hakonhagland changed the title 501 Can't load 'C:\Users\hakon\AppData\Local\Temp\par-68616b6f6e\cache-2fc254075e68b8cca263637e29f9a640f6669c6a\c8c63bf2.xs.dll' for module Net::Windows 10: SSLeay: load_file:The specified module could not be found (LWP::Protocol::https not installed) Windows 10 501 Can't load c8c63bf2.xs.dll for module Net::SSLeay: load_file:The specified module could not be found (LWP::Protocol::https not installed) Jun 19, 2020
@hakonhagland hakonhagland changed the title Windows 10 501 Can't load c8c63bf2.xs.dll for module Net::SSLeay: load_file:The specified module could not be found (LWP::Protocol::https not installed) Windows 10: Error: 501 Can't load c8c63bf2.xs.dll for module Net::SSLeay: load_file:The specified module could not be found (LWP::Protocol::https not installed) Jun 19, 2020
@rschupp
Copy link
Owner

rschupp commented Jun 19, 2020

Your exe misses the libssl* DLL (and other DLLs it depends on) which .../SSLeay.dll is linked against.

PAR::Packer does not pack these non-Perl DLL dependencies. You can either chase them done and explicitly pack them by hand with pp --link ..., see for instance this thread in the par@perl.org mailing list. Or use Shawn Laffan's App::PP::Autolink that does this for you.

@hakonhagland
Copy link
Author

Thank you! Using App::PP::Autolink worked fine. I was missing: libssl-1_1-x64__.dll, zlib1__.dll, and libcrypto-1_1-x64__.dll

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants