Perl无法加载SSLeay.dll,因为未安装LWP :: Protocol :: https

问题描述 投票:2回答:3

对于内部消息,我工作的公司使用Slack。它允许与大量不同的软件和服务进行大量的精彩集成。我正在制作自己的机器人,用于向Slack发送webhooks。

我完成了所有设置和工作,我有一个发送JSON有效负载的Perl脚本。如果我手动触发脚本,一切都完美无缺,我的Slack机器人发送消息。

但是,当脚本被Finalbuilder(用于自动构建处理的软件)触发时,它会失败。我收到以下回复:

501 Can't load 'C:/Strawberry/perl/site/lib/auto/Net/SSLeay/SSLeay.dll' for module Net::SSLeay: load_file:The specified module could not be found (LWP::Protocol::https not installed)

所以我想我需要安装“LWP :: Protocol :: https”模块。我刚打开我的cpan客户端并写了install LWP::Protocol::https

安装模块后仍然会出错。我写了test LWP::Protocol:https,它给出了以下回复:

Running test for module 'LWP::Protocol::https'
Running make for M/MS/MSCHILLI/LWP-Protocol-https-6.06.tar.gz
Checksum for C:\Strawberry\cpan\sources\authors\id\M\MS\MSCHILLI\LWP-Protocol-https-6.06.tar.gz ok
Scanning cache C:\Strawberry\cpan\build for sizes
............................................................................DONE

  CPAN.pm: Going to build M/MS/MSCHILLI/LWP-Protocol-https-6.06.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for LWP::Protocol::https
Could not read metadata file. Falling back to other methods to determine prerequisites
cp lib/LWP/Protocol/https.pm blib\lib\LWP\Protocol\https.pm
  MSCHILLI/LWP-Protocol-https-6.06.tar.gz
  C:\Strawberry\c\bin\dmake.EXE -- OK
Running make test
C:\Strawberry\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0,'blib\lib', 'blib\arch')" t/*.t
t/apache.t ....... ok
t/https_proxy.t .. 1/56 # creating cert for direct.ssl.access
# creating cert for direct.ssl.access
# creating cert for foo
# creating cert for bar
# creating cert for foo
# creating cert for foo
# creating cert for bar
# creating cert for bar
t/https_proxy.t .. ok
All tests successful.
Files=2, Tests=61,  8 wallclock secs ( 0.02 usr +  0.01 sys =  0.03 CPU)
Result: PASS
  MSCHILLI/LWP-Protocol-https-6.06.tar.gz
  C:\Strawberry\c\bin\dmake.EXE test -- OK

我可以使用Windows CMD或Finalbuilder触发我的脚本。两者都可以正常工作,但是当通过Continua CI激活Finalbuilder项目时,我得到“无法加载ssleay.dll”错误。

我不知道现在该做什么。有谁知道如何解决Perl错误?

json perl cpan finalbuilder slack-api
3个回答
1
投票

从IDE运行脚本时我遇到了同样的错误,但是没有从命令行运行(同样的问题)。

我的命令行是将这些添加到路径:(这些不是全局定义的)c:\ perl \ perl \ bin; c:\ perl \ sup \ bin; c:\ perl \ c \ bin;

但IDE没有这些。所以同样的修复应该适用于FinalBuilder,它缺少perl路径信息。


0
投票

你加载了头文件了吗?我不知道它们对于Windows是什么,但在Linux中,它们被称为:libssl-devzlib1g-dev


0
投票

我有一段时间也有这个错误。在我的情况下,解决方案很简单。事实证明我没有重新启动SVN服务,因此当它运行post-commit.bat文件时,PATH环境尚未更新以反映在Perl安装期间添加的新路径。

在我测试的时候,我是从一个具有正确路径的新控制台窗口运行的,但是一旦它从批处理文件通过SVN运行它就会崩溃,你发布了完全相同的错误。

© www.soinside.com 2019 - 2024. All rights reserved.