How to integrate LDAP in Perl?
If you try to use LDAP by adding "use Net::LDAP;"in your Perl script by you didn't have LDAP installed,you may probably get the following similar errors: C:Rebeccascriptperl>perl status.pl Can't locate Net/LDAP.pm in @INC (you may need to installtheNet::LDAP module) (@INC contains: C:/Perl64/site/lib C:/Perl64/lib .) atstatus.plline 4. ? How to to do here? ---- You need to install the LDAP module. Step1: Download "perl-ldap-0.64.tar" from http://ldap.perl.org/ Step2: check @INC by "perl –v",you may get like in the end of the result: @INC: ? C:/Perl64/site/lib ? C:/Perl64/lib Step3: Copy the folders in perl-ldap-0.64lib to either of the folder mentioned in @INC Step4: Check if you already have it: C:Rebeccascriptperl>perldoc Net::LDAP (if the following usage is shown,it means you already haveit installed) NAME ??? Net::LDAP-Lightweight Directory Access Protocol SYNOPSIS ???? use Net::LDAP; after installing LDAP,run the script again,you can see thereare also some errors: C:Rebeccascriptperl>perl status.pl Can't locate Convert/ASN1.pm in @INC (you may need toinstall the Convert::ASN1 BEGIN failed--compilation aborted atC:/Perl64/site/lib/Net/LDAP.pm line 12. Compilation failed in require at status.pl line 4. BEGIN failed--compilation aborted at status.pl line 4. ? So you need to install Convert module as well Step5: Download “Convert-ASN1-0.27.tar” from http://search.cpan.org/~gbarr/Convert-ASN1-0.27/lib/Convert/ASN1.pod Step6: Copy the folder under Convert-ASN1-0.27lib to C:/Perl64/site/libas well. For more information,could be got from? https://metacpan.org/pod/Net::LDAP::FAQ (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |