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

标签 json perl cpan finalbuilder slack-api

对于内部消息,我工作的公司使用 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 错误?

最佳答案

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

我的命令行将这些添加到路径中。 (这些不是全局定义的)。

c:\perl\perl\bin;c:\perl\sup\bin;c:\perl\c\bin;

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

关于json - Perl 无法加载 SSLeay.dll,因为未安装 LWP::Protocol::https,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28856329/

相关文章:

javascript - 使用 Mongoose 的 .populate() 返回某些字段

ios - 从 Swift 中的数据模型返回更具体的对象

Mysql用curdate更新时间戳

arrays - 在 perl 中对数组使用编辑距离

perl - 如何在 Perl 中生成 URL slug?

perl - 如何将 Perl 模块发布到 CPAN?

json - 将嵌套的 JSON 数据列出到 TableView

php - 如果状态成功,如何仅将 Json 插入/更新到 mysql

perl - 在 "print"语句的开头加点?

perl - 如何从 CPAN 安装脚本分发?