我工作的公司使用Slack进行内部消息传递。它允许与大量不同的软件和服务进行大量出色的集成。我正在制作自己的机器人,用于将 webhook 发送到 Slack。
我已经设置好一切并开始工作,我有一个发送 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 错误?