【问题标题】:Perl install failing for HTTP::Tiny testing for versions 5.18.2 and 5.20.1针对 5.18.2 和 5.20.1 版本的 HTTP::Tiny 测试的 Perl 安装失败
【发布时间】:2015-01-02 23:35:07
【问题描述】:

我正在尝试使用 Perlbrew 在 CENTOS Linux 服务器上安装 Perl。我试过安装 5.16、5.18 的几个版本。和 5.20,但它们似乎都未能通过 HTTP::Tiny 进行相同的测试:

../cpan/HTTP-Tiny/t/000_load.t .................................... ok
../cpan/HTTP-Tiny/t/001_api.t ..................................... ok
http_proxy URL must be in format http[s]://[auth@]<host>:<port>/
 at t/002_croakage.t line 29.
../cpan/HTTP-Tiny/t/002_croakage.t ................................ 
Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run 
http_proxy URL must be in format http[s]://[auth@]<host>:<port>/
 at t/003_agent.t line 17.
# Looks like your test exited with 255 before it could output anything.
../cpan/HTTP-Tiny/t/003_agent.t ................................... 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 8/8 subtests 
../cpan/HTTP-Tiny/t/010_url.t ..................................... ok
../cpan/HTTP-Tiny/t/020_headers.t ................................. ok
../cpan/HTTP-Tiny/t/030_response.t ................................ ok
../cpan/HTTP-Tiny/t/040_content.t ................................. ok
../cpan/HTTP-Tiny/t/050_chunked_body.t ............................ ok
../cpan/HTTP-Tiny/t/060_http_date.t ............................... ok
http_proxy URL must be in format http[s]://[auth@]<host>:<port>/
 at t/070_cookie_jar.t line 23.
# Looks like your test exited with 255 before it could output anything.
../cpan/HTTP-Tiny/t/070_cookie_jar.t .............................. 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 4/4 subtests 
../cpan/HTTP-Tiny/t/100_get.t ..................................... ok
../cpan/HTTP-Tiny/t/101_head.t .................................... ok
../cpan/HTTP-Tiny/t/102_put.t ..................................... ok
../cpan/HTTP-Tiny/t/103_delete.t .................................. ok
../cpan/HTTP-Tiny/t/104_post.t .................................... ok
../cpan/HTTP-Tiny/t/110_mirror.t .................................. ok
../cpan/HTTP-Tiny/t/130_redirect.t ................................ ok
https_proxy URL must be in format http[s]://[auth@]<host>:<port>/
 at t/140_proxy.t line 14.
../cpan/HTTP-Tiny/t/140_proxy.t ................................... 
Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run 
http_proxy URL must be in format http[s]://[auth@]<host>:<port>/
 at t/141_no_proxy.t line 13.
../cpan/HTTP-Tiny/t/141_no_proxy.t ................................ 
Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run 
../cpan/HTTP-Tiny/t/150_post_form.t ............................... ok
../cpan/HTTP-Tiny/t/160_cookies.t ................................. ok
../cpan/HTTP-Tiny/t/161_basic_auth.t .............................. ok
../cpan/HTTP-Tiny/t/162_proxy_auth.t .............................. ok
../cpan/HTTP-Tiny/t/170_keepalive.t ............................... ok

Test Summary Report
-------------------
../cpan/HTTP-Tiny/t/002_croakage.t                              (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: No plan found in TAP output
../cpan/HTTP-Tiny/t/003_agent.t                                 (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 8 tests but ran 0.
../cpan/HTTP-Tiny/t/070_cookie_jar.t                            (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 4 tests but ran 0.
../cpan/HTTP-Tiny/t/140_proxy.t                                 (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: No plan found in TAP output
../cpan/HTTP-Tiny/t/141_no_proxy.t                              (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: No plan found in TAP output
Files=2405, Tests=699314, 794 wallclock secs (70.76 usr 12.81 sys + 437.06 cusr 53.75 csys = 574.38 CPU)
Result: FAIL
make: *** [test_harness] Error 5

我注意到140_proxy.t 正在尝试使用http://localhost:8080 作为服务器测试。但是,我们已经在该端口上运行了一个 httpd。 002_croakage.t 甚至不包含任何测试。

所以,

  • 这些通常被认为是不好的测试吗?
  • 这是其他人遇到的问题吗?
  • 这与我们当前在端口 8080 上运行的服务有什么关系吗?
  • 如果我进行强制安装会有问题吗?
  • 而且,为什么 HTTP::Tiny 运行测试?它不是安装时附带的标准 Perl 模块。

【问题讨论】:

    标签: perl perlbrew


    【解决方案1】:

    尝试不让您的服务在 8080 上运行?我猜这是你失败的唯一原因,但唯一确定的方法就是尝试。

    有几个failing test reports,但与您遇到的错误无关,而且都与连接到外部服务器(google、github、twitter)有关。

    而且,为什么 HTTP::Tiny 运行测试?它不是安装时附带的标准 Perl 模块。

    自 Perl 5.13.9 以来随 Perl 发行版一起提供的标准 Perl 模块。

    【讨论】:

    • 你是对的。 HTTP:Tiny 在 5.14 之后的所有 Perl 安装中。奇怪,虽然perlmodlib 确实列出了它,但官方Perldoc 中没有记录。
    • 我无法关闭在端口 8080 上运行的服务来试一试。白天,我们依赖它作为构建服务器,晚上,我们从构建服务器获取要加载的软件。它必须每天 24 小时不间断。当我试图在元旦安装 Perlbrew 时,我们的 IT 部门安装了超过 3 打的软件包,这些软件包必须从这台服务器上获取。
    • 发现问题:我将http_proxy 设置为proxy.server.com:3654 而不是http://proxy.server.com:3654。这也搞砸了 CPAN 的配置。但是,wget 本身对此没有任何问题。我刚刚安装了 HTTP::Tiny 0.53 版并替换了 Perl 5.20.1 附带的 0.43 版。
    猜你喜欢
    • 1970-01-01
    • 2018-06-15
    • 2014-12-25
    • 2017-08-28
    • 1970-01-01
    • 1970-01-01
    • 2014-11-23
    • 2021-03-08
    • 1970-01-01
    相关资源
    最近更新 更多