在 Windows 7 上运行的 Strawberry Perl 上安装 Net::LDAP

在 Windows 7 上运行的 Strawberry Perl 上安装 Net::LDAP

我尝试在 Strawberry Perl 64 位 (v5.26.2) 上安装 Net::LDAP,但没有成功。命令行“cpanm”失败并指向 build.log。文件似乎不在预期的位置,这让我认为某些系统环境变量丢失或未设置为正确的目录。对“丢失”文件的后续搜索成功。

我还尝试使用“所有程序”中的 CPAN 工具和独立安装,但这些在 PL2BAT.bat 尝试从未知目录复制文件时失败。

任何关于如何设置目录结构或系统变量的想法都将受到欢迎。

来自 CPANM 的 Build.log

cpanm (App::cpanminus) 1.7043 on perl 5.026002 built for MSWin32-x64-multi-thread
Work directory is C:\Users\IBM_AD~1/.cpanm/work/1531317263.13328
You have make C:\Strawberry\c\bin\gmake.exe
You have LWP 6.33
Falling back to Archive::Tar 2.26
Searching install () on cpanmetadb ...
install is up to date. (0.01)
Searching Net::LDAP () on cpanmetadb ...
--> Working on Net::LDAP
Fetching http://www.cpan.org/authors/id/M/MA/MARSCHAP/perl-ldap-0.65.tar.gz
-> OK
Unpacking perl-ldap-0.65.tar.gz
Entering perl-ldap-0.65
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.34)
Configuring perl-ldap-0.65
Running Makefile.PL
*** Module::AutoInstall version 1.03
*** Checking for Perl dependencies...
*** Since we're running under CPAN, I'll just let it take care
    of the dependency's installation later.
[Core Features]
- Test::More        ...loaded. (1.302135)
- File::Basename    ...loaded. (2.85)
- File::Compare     ...loaded. (1.1006)
- File::Path        ...loaded. (2.15)
- IO::File          ...loaded. (1.16)
- Text::Soundex     ...loaded. (3.05)
- MIME::Base64      ...loaded. (3.15)
- Convert::ASN1     ...loaded. (0.27 >= 0.2)
[IPv6 support]
- IO::Socket::INET6 ...loaded. (2.72)
[LDAPS support]
- IO::Socket::SSL   ...loaded. (2.056 >= 1.26)
[SASL authentication]
- Authen::SASL      ...loaded. (2.16 >= 2.00)
- Digest::MD5       ...loaded. (2.55)
- Digest::HMAC_MD5  ...loaded. (1.01)
- GSSAPI            ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n] n
[LDAP URLs]
- URI::ldap         ...loaded. (1.73 >= 1.1)
[Time conversion functions]
- Time::Local       ...loaded. (1.25)
[Read/Write DSML files]
- XML::SAX::Writer  ...missing.
- XML::SAX::Base    ...loaded. (1.09)
==> Auto-install the 1 optional module(s) from CPAN? [n] n
[Extended URL support when reading LDIFs]
- LWP               ...loaded. (6.33)
[LWP support for the LDAP protocol family]
- LWP::Protocol     ...loaded. (6.33)
- LWP::MediaTypes   ...loaded. (6.02)
- HTTP::Negotiate   ...loaded. (6.01)
- HTTP::Response    ...loaded. (6.16)
- HTTP::Status      ...loaded. (6.16)
- JSON              ...loaded. (2.97001)
*** Module::AutoInstall configuration finished.
Checking if your kit is complete...
Looks good
Generating a gmake-style Makefile
Writing Makefile for Net::LDAP
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have JSON 0 ... Yes (2.97001)
Checking if you have File::Basename 0 ... Yes (2.85)
Checking if you have Time::Local 0 ... Yes (1.25)
Checking if you have LWP 0 ... Yes (6.33)
Checking if you have LWP::Protocol 0 ... Yes (6.33)
Checking if you have Text::Soundex 0 ... Yes (3.05)
Checking if you have URI::ldap 1.1 ... Yes (1.73)
Checking if you have Authen::SASL 2.00 ... Yes (2.16)
Checking if you have File::Compare 0 ... Yes (1.1006)
Checking if you have Digest::MD5 0 ... Yes (2.55)
Checking if you have Convert::ASN1 0.2 ... Yes (0.27)
Checking if you have Digest::HMAC_MD5 0 ... Yes (1.01)
Checking if you have Test::More 0 ... Yes (1.302135)
Checking if you have HTTP::Negotiate 0 ... Yes (6.01)
Checking if you have IO::File 0 ... Yes (1.16)
Checking if you have XML::SAX::Base 0 ... Yes (1.09)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.34)
Checking if you have File::Path 0 ... Yes (2.15)
Checking if you have LWP::MediaTypes 0 ... Yes (6.02)
Checking if you have IO::Socket::INET6 0 ... Yes (2.72)
Checking if you have HTTP::Response 0 ... Yes (6.16)
Checking if you have MIME::Base64 0 ... Yes (3.15)
Checking if you have HTTP::Status 0 ... Yes (6.16)
Checking if you have IO::Socket::SSL 1.26 ... Yes (2.056)
Building and testing perl-ldap-0.65
cp lib/Bundle/Net/LDAP.pm blib\lib\Bundle\Net\LDAP.pm
cp lib/LWP/Protocol/ldap.pm blib\lib\LWP\Protocol\ldap.pm
cp lib/LWP/Protocol/ldapi.pm blib\lib\LWP\Protocol\ldapi.pm
cp lib/Net/LDAP.pm blib\lib\Net\LDAP.pm
cp lib/Net/LDAP/Control/Assertion.pm blib\lib\Net\LDAP\Control\Assertion.pm
cp lib/Net/LDAP/ASN.pm blib\lib\Net\LDAP\ASN.pm
cp lib/Net/LDAP/Control/PersistentSearch.pm blib\lib\Net\LDAP\Control\PersistentSearch.pm
cp lib/Net/LDAP/Control/MatchedValues.pm blib\lib\Net\LDAP\Control\MatchedValues.pm
cp lib/Net/LDAP/Control/EntryChange.pm blib\lib\Net\LDAP\Control\EntryChange.pm
cp lib/Net/LDAP/Control/PostRead.pm blib\lib\Net\LDAP\Control\PostRead.pm
cp lib/Net/LDAP/Control/PasswordPolicy.pm blib\lib\Net\LDAP\Control\PasswordPolicy.pm
cp lib/Net/LDAP/Control/ManageDsaIT.pm blib\lib\Net\LDAP\Control\ManageDsaIT.pm
cp lib/Net/LDAP/Bind.pm blib\lib\Net\LDAP\Bind.pm
cp lib/LWP/Protocol/ldaps.pm blib\lib\LWP\Protocol\ldaps.pm
cp lib/Net/LDAP/Control.pm blib\lib\Net\LDAP\Control.pm
cp lib/Net/LDAP/Control/Paged.pm blib\lib\Net\LDAP\Control\Paged.pm
cp lib/Net/LDAP/Constant.pm blib\lib\Net\LDAP\Constant.pm
cp lib/Net/LDAP.pod blib\lib\Net\LDAP.pod
cp lib/Net/LDAP/Control/DontUseCopy.pm blib\lib\Net\LDAP\Control\DontUseCopy.pm
cp lib/Net/LDAP/Entry.pod blib\lib\Net\LDAP\Entry.pod
cp lib/Net/LDAP/Control/VLV.pm blib\lib\Net\LDAP\Control\VLV.pm
cp lib/Net/LDAP/Control/SyncRequest.pm blib\lib\Net\LDAP\Control\SyncRequest.pm
cp lib/Net/LDAP/Examples.pod blib\lib\Net\LDAP\Examples.pod
cp lib/Net/LDAP/Entry.pm blib\lib\Net\LDAP\Entry.pm
cp lib/Net/LDAP/Control/ProxyAuth.pm blib\lib\Net\LDAP\Control\ProxyAuth.pm
cp lib/Net/LDAP/Extension/Cancel.pm blib\lib\Net\LDAP\Extension\Cancel.pm
cp lib/Net/LDAP/Control/Sort.pm blib\lib\Net\LDAP\Control\Sort.pm
cp lib/Net/LDAP/DSML.pm blib\lib\Net\LDAP\DSML.pm
cp lib/Net/LDAP/Control/Relax.pm blib\lib\Net\LDAP\Control\Relax.pm
cp lib/Net/LDAP/Control/PreRead.pm blib\lib\Net\LDAP\Control\PreRead.pm
cp lib/Net/LDAP/Control/VLVResponse.pm blib\lib\Net\LDAP\Control\VLVResponse.pm
cp lib/Net/LDAP/Extension/SetPassword.pm blib\lib\Net\LDAP\Extension\SetPassword.pm
cp lib/Net/LDAP/Extension/Refresh.pm blib\lib\Net\LDAP\Extension\Refresh.pm
cp lib/Net/LDAP/Control/SyncDone.pm blib\lib\Net\LDAP\Control\SyncDone.pm
cp lib/Net/LDAP/Control/SyncState.pm blib\lib\Net\LDAP\Control\SyncState.pm
cp lib/Net/LDAP/Extension.pm blib\lib\Net\LDAP\Extension.pm
cp lib/Net/LDAP/Control/SortResult.pm blib\lib\Net\LDAP\Control\SortResult.pm
cp lib/Net/LDAP/Schema.pm blib\lib\Net\LDAP\Schema.pm
cp lib/Net/LDAP/Extra.pm blib\lib\Net\LDAP\Extra.pm
cp lib/Net/LDAP/Search.pm blib\lib\Net\LDAP\Search.pm
cp lib/Net/LDAP/FilterMatch.pm blib\lib\Net\LDAP\FilterMatch.pm
cp lib/Net/LDAP/Extra/eDirectory.pm blib\lib\Net\LDAP\Extra\eDirectory.pm
cp lib/Net/LDAP/Intermediate/SyncInfo.pm blib\lib\Net\LDAP\Intermediate\SyncInfo.pm
cp lib/Net/LDAP/Extra/AD.pm blib\lib\Net\LDAP\Extra\AD.pm
cp lib/Net/LDAP/Filter.pod blib\lib\Net\LDAP\Filter.pod
cp lib/Net/LDAP/LDIF.pod blib\lib\Net\LDAP\LDIF.pod
cp lib/Net/LDAP/Extension/WhoAmI.pm blib\lib\Net\LDAP\Extension\WhoAmI.pm
cp lib/Net/LDAP/Reference.pod blib\lib\Net\LDAP\Reference.pod
cp lib/Net/LDAP/Schema.pod blib\lib\Net\LDAP\Schema.pod
cp lib/Net/LDAP/Message.pm blib\lib\Net\LDAP\Message.pm
cp lib/Net/LDAP/LDIF.pm blib\lib\Net\LDAP\LDIF.pm
cp lib/Net/LDAP/Message.pod blib\lib\Net\LDAP\Message.pod
cp lib/Net/LDAP/Security.pod blib\lib\Net\LDAP\Security.pod
cp lib/Net/LDAP/Search.pod blib\lib\Net\LDAP\Search.pod
cp lib/Net/LDAP/Intermediate.pm blib\lib\Net\LDAP\Intermediate.pm
cp lib/Net/LDAP/FAQ.pod blib\lib\Net\LDAP\FAQ.pod
cp lib/Net/LDAP/RootDSE.pm blib\lib\Net\LDAP\RootDSE.pm
cp lib/Net/LDAP/Filter.pm blib\lib\Net\LDAP\Filter.pm
cp lib/Net/LDAP/RFC.pod blib\lib\Net\LDAP\RFC.pod
cp lib/Net/LDAPI.pm blib\lib\Net\LDAPI.pm
cp lib/Net/LDAP/Util.pm blib\lib\Net\LDAP\Util.pm
cp lib/Net/LDAPS.pm blib\lib\Net\LDAPS.pm
"C:\Strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib\lib', 'blib\arch')" t/00ldif-entry.t t/01canon_dn.t t/02filter.t t/03schema.t t/04refloop.t t/05dsml.t t/06constant.t t/07filtermatch.t t/08time.t t/09ldif-http-url.t t/10ldif-controls.t t/40connect.t t/41populate.t t/42search.t t/43modify.t t/44schema.t t/45dse.t t/46ssl.t t/47ipc.t t/48url.t t/49lwp.t t/60cancel.t t/70sortctrl.t t/71preread.t t/72postread.t t/73assert.t t/74matchedvalues.t
Cannot detect source of 't/00ldif-entry.t'! at C:/Strawberry/perl/lib/TAP/Parser/IteratorFactory.pm line 256.
    TAP::Parser::IteratorFactory::detect_source(TAP::Parser::IteratorFactory=HASH(0x2e8ee58), TAP::Parser::Source=HASH(0x2e1f1a8)) called at C:/Strawberry/perl/lib/TAP/Parser/IteratorFactory.pm line 211
    TAP::Parser::IteratorFactory::make_iterator(TAP::Parser::IteratorFactory=HASH(0x2e8ee58), TAP::Parser::Source=HASH(0x2e1f1a8)) called at C:/Strawberry/perl/lib/TAP/Parser.pm line 472
    TAP::Parser::_initialize(TAP::Parser=HASH(0x2e1f7c8), HASH(0x2aa7130)) called at C:/Strawberry/perl/lib/TAP/Object.pm line 55
    TAP::Object::new("TAP::Parser", HASH(0x2aa7130)) called at C:/Strawberry/perl/lib/TAP/Object.pm line 130
    TAP::Object::_construct(TAP::Harness=HASH(0x2d49348), "TAP::Parser", HASH(0x2aa7130)) called at C:/Strawberry/perl/lib/TAP/Harness.pm line 852
    TAP::Harness::make_parser(TAP::Harness=HASH(0x2d49348), TAP::Parser::Scheduler::Job=HASH(0x2e24680)) called at C:/Strawberry/perl/lib/TAP/Harness.pm line 651
    TAP::Harness::_aggregate_single(TAP::Harness=HASH(0x2d49348), TAP::Parser::Aggregator=HASH(0x2d471d0), TAP::Parser::Scheduler=HASH(0x2e1fb88)) called at C:/Strawberry/perl/lib/TAP/Harness.pm line 743
    TAP::Harness::aggregate_tests(TAP::Harness=HASH(0x2d49348), TAP::Parser::Aggregator=HASH(0x2d471d0), "t/00ldif-entry.t", "t/01canon_dn.t", "t/02filter.t", "t/03schema.t", "t/04refloop.t", "t/05dsml.t", ...) called at C:/Strawberry/perl/lib/Test/Harness.pm line 136
    Test::Harness::_aggregate_tests(TAP::Harness=HASH(0x2d49348), TAP::Parser::Aggregator=HASH(0x2d471d0), "t/00ldif-entry.t", "t/01canon_dn.t", "t/02filter.t", "t/03schema.t", "t/04refloop.t", "t/05dsml.t", ...) called at C:/Strawberry/perl/lib/Test/Harness.pm line 118
    Test::Harness::_aggregate(TAP::Harness=HASH(0x2d49348), TAP::Parser::Aggregator=HASH(0x2d471d0), "t/00ldif-entry.t", "t/01canon_dn.t", "t/02filter.t", "t/03schema.t", "t/04refloop.t", "t/05dsml.t", ...) called at C:/Strawberry/perl/lib/Test/Harness.pm line 151
    Test::Harness::runtests("t/00ldif-entry.t", "t/01canon_dn.t", "t/02filter.t", "t/03schema.t", "t/04refloop.t", "t/05dsml.t", "t/06constant.t", "t/07filtermatch.t", ...) called at C:/Strawberry/perl/lib/ExtUtils/Command/MM.pm line 72
    ExtUtils::Command::MM::test_harness(0, "inc", "blib\\lib", "blib\\arch") called at -e line 1
gmake: *** [Makefile:844: test_dynamic] Error 2
-> FAIL Installing Net::LDAP failed. See C:\Users\IBM_AD~1\.cpanm\work\1531317263.13328\build.log for details. Retry with --force to force install it.

Strawberry Perl 是原始安装,没有打任何补丁。如果安装成功,那么一定是我在 Windows 中自定义了某些东西。我会查看注册表,看看是否有错误设置。

通过删除我对 PATH 的添加并使用强制安装解决了问题。

相关内容