系统:debian 7 x64 RC 1 Perl 版本:v5.14.2
当尝试安装 MIME::Tools 时,我无法使其正确编译。
cpan[4]> install MIME::Tools
Going to read '/root/.cpan/Metadata'
Database was generated on Sat, 13 Apr 2013 01:41:02 GMT
Running install for module 'MIME::Tools'
Running make for D/DS/DSKOLL/MIME-tools-5.504.tar.gz
Checksum for /root/.cpan/sources/authors/id/D/DS/DSKOLL/MIME-tools-5.504.tar.gz ok
Scanning cache /root/.cpan/build for sizes
........................................................................----DONE
DEL(1/14): /root/.cpan/build/libwww-perl-6.05-ZDaNp5
DEL(2/14): /root/.cpan/build/File-Scan-ClamAV-1.91-Ti5677
DEL(3/14): /root/.cpan/build/Crypt-OpenSSL-Random-0.04-5B9ULy
DEL(4/14): /root/.cpan/build/Crypt-OpenSSL-RSA-0.28-04I5K5
DEL(5/14): /root/.cpan/build/Mail-DKIM-0.40-fzAICY
DEL(6/14): /root/.cpan/build/Net-CIDR-Lite-0.21-2WIaXR
DEL(7/14): /root/.cpan/build/Sys-Hostname-Long-1.4-DgtI9U
DEL(8/14): /root/.cpan/build/Mail-SPF-Query-1.999.1-RlMA1a
DEL(9/14): /root/.cpan/build/Mail-SPF-Query-1.999.1-gfsVza
DEL(10/14): /root/.cpan/build/Net-DNS-Resolver-Programmable-v0.003-Wuv2JV
DEL(11/14): /root/.cpan/build/Mail-SPF-v2.8.0-yUk_ZP
DEL(12/14): /root/.cpan/build/MLDBM-2.05-UYpHDK
DEL(13/14): /root/.cpan/build/Mail-SRS-0.31-F9Cxsm
DEL(14/14): /root/.cpan/build/Net-IP-Match-Regexp-1.01-I3a1Pe
CPAN.pm: Going to build D/DS/DSKOLL/MIME-tools-5.504.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for MIME::Tools
Writing MYMETA.yml and MYMETA.json
cp lib/MIME/Body.pm blib/lib/MIME/Body.pm
cp lib/MIME/Decoder/Gzip64.pm blib/lib/MIME/Decoder/Gzip64.pm
cp lib/MIME/Field/ContDisp.pm blib/lib/MIME/Field/ContDisp.pm
cp lib/MIME/Parser/Results.pm blib/lib/MIME/Parser/Results.pm
cp lib/MIME/Field/ContType.pm blib/lib/MIME/Field/ContType.pm
cp lib/MIME/Decoder/NBit.pm blib/lib/MIME/Decoder/NBit.pm
cp lib/MIME/Entity.pm blib/lib/MIME/Entity.pm
cp lib/MIME/Head.pm blib/lib/MIME/Head.pm
cp lib/MIME/Parser/Filer.pm blib/lib/MIME/Parser/Filer.pm
cp lib/MIME/Words.pm blib/lib/MIME/Words.pm
cp lib/MIME/Field/ParamVal.pm blib/lib/MIME/Field/ParamVal.pm
cp lib/MIME/Decoder/BinHex.pm blib/lib/MIME/Decoder/BinHex.pm
cp lib/MIME/Field/ConTraEnc.pm blib/lib/MIME/Field/ConTraEnc.pm
cp lib/MIME/Tools.pm blib/lib/MIME/Tools.pm
cp lib/MIME/Decoder/Binary.pm blib/lib/MIME/Decoder/Binary.pm
cp lib/MIME/Decoder.pm blib/lib/MIME/Decoder.pm
cp lib/MIME/Decoder/UU.pm blib/lib/MIME/Decoder/UU.pm
cp lib/MIME/Decoder/QuotedPrint.pm blib/lib/MIME/Decoder/QuotedPrint.pm
cp lib/MIME/Decoder/Base64.pm blib/lib/MIME/Decoder/Base64.pm
cp lib/MIME/WordDecoder.pm blib/lib/MIME/WordDecoder.pm
cp lib/MIME/Parser.pm blib/lib/MIME/Parser.pm
cp lib/MIME/Parser/Reader.pm blib/lib/MIME/Parser/Reader.pm
Manifying blib/man3/MIME::Decoder::Gzip64.3pm
Manifying blib/man3/MIME::Body.3pm
Manifying blib/man3/MIME::Field::ContDisp.3pm
Manifying blib/man3/MIME::Parser::Results.3pm
Manifying blib/man3/MIME::Field::ContType.3pm
Manifying blib/man3/MIME::Decoder::NBit.3pm
Manifying blib/man3/MIME::Entity.3pm
Manifying blib/man3/MIME::Parser::Filer.3pm
Manifying blib/man3/MIME::Head.3pm
Manifying blib/man3/MIME::Words.3pm
Manifying blib/man3/MIME::Field::ParamVal.3pm
Manifying blib/man3/MIME::Decoder::BinHex.3pm
Manifying blib/man3/MIME::Field::ConTraEnc.3pm
Manifying blib/man3/MIME::Tools.3pm
Manifying blib/man3/MIME::Decoder::Binary.3pm
Manifying blib/man3/MIME::Decoder.3pm
Manifying blib/man3/MIME::Decoder::UU.3pm
Manifying blib/man3/MIME::Decoder::Base64.3pm
Manifying blib/man3/MIME::Decoder::QuotedPrint.3pm
Manifying blib/man3/MIME::WordDecoder.3pm
Manifying blib/man3/MIME::Parser::Reader.3pm
Manifying blib/man3/MIME::Parser.3pm
DSKOLL/MIME-tools-5.504.tar.gz
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t
t/02-kwalitee.t ................... skipped: Test::Kwalitee not installed; skipping
t/02-pod-coverage.t ............... skipped: Test::Pod::Coverage disabled. TEST_POD_COVERAGE=1 if you want it.
t/02-pod.t ........................ skipped: Test::Pod 1.00 required for testing POD
t/99-prepare.t .................... ok
t/attachment-filename-encoding.t .. ok
t/Body.t .......................... ok
t/BodyPrint.t ..................... ok
t/Decoder.t ....................... # Using gzip: 1
t/Decoder.t ....................... ok
t/EmptyPart.t ..................... ok
t/Entity.t ........................ ok
t/Filer.t ......................... ok
t/Gauntlet.t ...................... ok
t/Head.t .......................... ok
t/Misc.t .......................... ok
t/ParamVal.t ...................... ok
t/Parser.t ........................ ok
t/ParserEncoded.t ................. ok
t/ParserPreamble.t ................ ok
t/Ref.t ........................... ok
t/Smtpsend.t ...................... accept failed: Connection timed out at t/Smtpsend.t line 61.
# Looks like your test exited with 110 before it could output anything.
t/Smtpsend.t ...................... Dubious, test returned 110 (wstat 28160, 0x6e00)
Failed 9/9 subtests
t/ticket-11901.t .................. ok
t/ticket-22684.t .................. ok
t/ticket-37139.t .................. ok
t/ticket-41632.t .................. ok
t/ticket-43439.t .................. ok
t/ticket-52924.t .................. ok
t/ticket-5462.t ................... ok
t/ticket-60931.t .................. ok
t/ticket-65681.t .................. ok
t/ticket-66025.t .................. ok
t/ticket-71041.t .................. ok
t/ticket-71677.t .................. ok
t/ticket-80433.t .................. ok
t/WordDecoder.t ................... ok
t/WordEncoder.t ................... ok
t/Words.t ......................... ok
Test Summary Report
-------------------
t/Smtpsend.t (Wstat: 28160 Tests: 0 Failed: 0)
Non-zero exit status: 110
Parse errors: Bad plan. You planned 9 tests but ran 0.
Files=36, Tests=386, 26 wallclock secs ( 0.25 usr 0.37 sys + 2.79 cusr 1.00 csys = 4.41 CPU)
Result: FAIL
Failed 1/36 test programs. 0/386 subtests failed.
make: *** [test_dynamic] Error 255
DSKOLL/MIME-tools-5.504.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports DSKOLL/MIME-tools-5.504.tar.gz
Running make install
make test had returned bad status, won't install without force
Failed during this command:
DSKOLL/MIME-tools-5.504.tar.gz : make_test NO
因此这失败了:
t/Smtpsend.t ...................... accept failed: Connection timed out at t/Smtpsend.t line 61.
# Looks like your test exited with 110 before it could output anything.
t/Smtpsend.t ...................... Dubious, test returned 110 (wstat 28160, 0x6e00)
我确实找到了某物关于这个问题,但没有用。它指出要从这个更改代码
# In the parent
my $s = $sock->accept();
if (!$s) {
kill(9, $pid);
die("accept failed: $!");
}
对此
sleep 1;
# In the parent
my $s = $sock->accept();
if (!$s) {
kill(9, $pid);
die("accept failed: $!");
}
但是我的代码是这样的
# In the parent
my $s = $sock->accept();
if (!$s) {
sleep(1);
$s = $sock->accept();
if (!$s) {
kill(9, $pid);
die("accept failed: $!");
}
}
尽管我sleep 1;
在注释前面确实加了 a(尽管我怀疑在这个较新的版本中在条件中添加了睡眠),但它仍然无法正确编译。
有什么想法吗 ?
谢谢!
答案1
你得到它编译正确来说,它只是失败了一个测试!更多人抱怨测试失败,例如这里。您可能不必太担心。这意味着您可以强制安装该软件包,一切都会正常进行。
但一般来说,如果你使用系统 perl,请尽可能通过包管理器安装尽可能多的包 - 这也可以解决你的问题。在 Debian 上,它很简单
apt-get install libmime-tools-perl
您已经完成了!
答案2
我遇到了同样的问题,经过调查我认为我已经找到了根本原因。
我分离了服务器和客户端代码以消除任何时间问题,并发现客户端或发送端在尝试使用 Mail::Util 中的 mailaddress() 函数识别发件人时延迟了大约 30 秒。
因此,我找到的解决方法如下,在 Smtpsend.t 的开头,即在使用语句之后添加以下行,
$ENV{MAILDOMAIN} = 'example.com';
测试仍然需要 13 秒才能运行,但它成功完成了。当然,您可以在 shell 中设置此环境变量,但我对可以随包分发的解决方案感兴趣。
请告诉我这是否适用于您的环境。我在 OSX 上运行。
我将向 Mime::Tools 伙计们提出一个问题。