Linux

WWW::Mechanize Perl 模組不會安裝在伺服器上

  • December 9, 2018

我試圖弄清楚為什麼 Perl 模組不會安裝在我的伺服器上。

cpanm WWW::Mechanize

它處理東西很長時間,然後最終死於:

root@admin:~# cpanm WWW::Mechanize
--> Working on WWW::Mechanize
Fetching http://www.cpan.org/authors/id/O/OA/OALDERS/WWW-Mechanize-1.90.tar.gz ... OK
Configuring WWW-Mechanize-1.90 ... OK
Building and testing WWW-Mechanize-1.90 ... FAIL
! Installing WWW::Mechanize failed. See /root/.cpanm/work/1543994046.20570/build.log for details. Retry with --force to force install it.

日誌文件中有這樣的內容:

t/00-report-prereqs.t .................... ok
t/add_header.t ........................... ok
t/aliases.t .............................. ok
t/area_link.t ............................ ok
t/autocheck.t ............................ ok
t/bad-request.t .......................... ok
t/clone.t ................................ ok
t/content.t .............................. ok
# Test server http://127.0.0.1:31546 as PID 20661
t/cookies.t .............................. ok
t/credentials-api.t ...................... ok
t/credentials.t .......................... ok
t/die.t .................................. ok
t/dump.t ................................. ok
t/field.t ................................ ok
t/find_frame.t ........................... ok
t/find_image.t ........................... ok
t/find_inputs.t .......................... ok
t/find_link-warnings.t ................... ok
t/find_link.t ............................ ok
t/find_link_id.t ......................... ok
t/form-parsing.t ......................... ok
t/form_with_fields.t ..................... ok
t/form_with_fields_passthrough_params.t .. ok
t/frames.t ............................... ok

#   Failed test '... and it was recorded in the history'
#   at t/history.t line 131.
#          got: '3'
#     expected: '2'
# Looks like you failed 1 test of 28.
t/history.t .............................. 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/28 subtests 
t/image-new.t ............................ ok
t/image-parse.t .......................... ok
t/link-base.t ............................ ok
t/link-relative.t ........................ ok
t/link.t ................................. ok
t/local/back.t ........................... ok
t/local/click.t .......................... ok
t/local/click_button.t ................... ok
# Running tests against http://127.0.0.1:50871/?xml=1
t/local/content.t ........................ ok
t/local/encoding.t ....................... ok
t/local/failure.t ........................ ok
t/local/follow.t ......................... ok
t/local/form.t ........................... ok
t/local/get.t ............................ ok
t/local/nonascii.t ....................... ok
t/local/overload.t ....................... skipped: Mysteriously stopped passing, and I don't know why.
t/local/page_stack.t ..................... ok
t/local/post.t ........................... ok
t/local/referer.t ........................ ok
t/local/reload.t ......................... ok
t/local/submit.t ......................... ok
t/mech-dump/mech-dump.t .................. ok
t/new.t .................................. ok
t/regex-error.t .......................... ok
t/save_content.t ......................... ok
t/select.t ............................... ok
t/taint.t ................................ skipped: Test::Taint required for checking taintedness
t/tick.t ................................. ok
t/untaint.t .............................. ok
t/upload.t ............................... ok
t/uri.t .................................. ok
t/warn.t ................................. ok
t/warnings.t ............................. ok

Test Summary Report
-------------------
t/history.t                            (Wstat: 256 Tests: 28 Failed: 1)
 Failed test:  23
 Non-zero exit status: 1
Files=59, Tests=752, 1241 wallclock secs ( 0.29 usr  0.08 sys + 11.13 cusr  1.60 csys = 13.10 CPU)
Result: FAIL
Failed 1/59 test programs. 1/752 subtests failed.
Makefile:946: recipe for target 'test_dynamic' failed
make: *** [test_dynamic] Error 255
-> FAIL Installing WWW::Mechanize failed. See /root/.cpanm/work/1543994046.20570/build.log for details. Retry with --force to force install it.

我在那裡看到了這個,但我不確定它是什麼意思:

#   Failed test '... and it was recorded in the history'
#   at t/history.t line 131.
#          got: '3'
#     expected: '2'
# Looks like you failed 1 test of 28.
t/history.t .............................. 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/28 subtests 

有什麼建議麼?我需要這個模組用於我要安裝的另一個模組:/

Perl CPAN 包安裝為 Linux 分發包$$ Debian/Ubuntu $$

如果可能,將 perl 包安裝為您的 Linux 分發包。

WWW::Mechanize 在 Ubuntu(和其他 Debian 系列發行版)上是可能的:

[Ubuntu – xenial

軟體包中 libwww-mechanize-perl 軟體包的詳細資訊:libwww-mechanize-perl (1.75-1)](https://packages.ubuntu.com/xenial/libwww-mechanize-perl)

引用自:https://serverfault.com/questions/942948