[sf-perl] trouble installing Net::LDAP

Francisco Obispo fobispo at isc.org
Thu Aug 18 18:23:08 PDT 2011


Module::Install uses  Module::Install::AutoInstall to install dependencies that it sees as missing. 

One thing you could do, is manually install each dependency into the INSTALL_BASE directory, and then execute perl with the -I option to include $INSTALL_BASE/lib/perl5 as part of @INC

Also, configure CPAN to pass INSTALL_BASE as part of Makefile.PL:

$ perl -MCPAN -e shell
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.9402)
Enter 'h' for help.

cpan[1]> o conf makepl_arg INSTALL_BASE=/nas/reg
    makepl_arg         [INSTALL_BASE=/nas/reg]
Please use 'o conf commit' to make the config permanent!

Try that to see if it works.




On Aug 18, 2011, at 6:02 PM, David Alban wrote:

> On Thu, Aug 18, 2011 at 4:50 PM, Francisco Obispo <fobispo at isc.org> wrote:
>> $ perl Makefile.PL INSTALL_BASE=/nas/reg
>> 
>> Should inherit across the others as well, if not, try exporting it as a global variable.
> 
> thanks.  it still wants to write to the system location.
> 
> $ perl Makefile.PL INSTALL_BASE=/nas/reg
> *** Module::AutoInstall version 1.03
> *** Checking for Perl dependencies...
> [Core Features]
> - Convert::ASN1    ...missing. (would need 0.07)
> ==> Auto-install the 1 mandatory module(s) from CPAN? [y] y
> [SASL authentication]
> - Authen::SASL     ...missing. (would need 2.00)
> ==> Auto-install the 1 optional module(s) from CPAN? [n] y
> [LDAP URLs]
> - URI::ldap        ...missing. (would need 1.1)
> ==> Auto-install the 1 optional module(s) from CPAN? [n] y
> [LDAPS]
> - IO::Socket::SSL  ...missing. (would need 0.93)
> ==> Auto-install the 1 optional module(s) from CPAN? [n] y
> [Read/Write DSML files]
> - MIME::Base64     ...loaded. (3.07)
> - XML::SAX::Writer ...missing.
> ==> Auto-install the 1 optional module(s) from CPAN? [n] y
> [Read/Write LDIF files]
> - MIME::Base64     ...loaded. (3.07)
> *** Dependencies will be installed the next time you type 'make'.
>    (You may need to do that as the 'root' user.)
> *** Module::AutoInstall configuration finished.
> *** Installing dependencies...
> *** You are not allowed to write to the directory
> '/usr/lib/perl5/site_perl/5.8.8';
>    the installation may fail due to insufficient permissions.
> 
> ==> Should we try to re-execute the autoinstall process with 'sudo'? [y]
> 
> so i did:
> 
> $ find * ! -type d | xargs fgrep PREFIX
> Makefile:#   MakeMaker ARGV: (q[PREFIX=/nas/reg], q[LIB=/nas/reg/lib/perl])
> Makefile:PREFIX = /nas/reg
> Makefile:PERLPREFIX = $(PREFIX)
> Makefile:SITEPREFIX = $(PREFIX)
> Makefile:VENDORPREFIX = $(PREFIX)
> Makefile:INSTALLBIN = $(PERLPREFIX)/bin
> Makefile:INSTALLSITEBIN = $(SITEPREFIX)/bin
> Makefile:INSTALLVENDORBIN = $(VENDORPREFIX)/bin
> Makefile:INSTALLSCRIPT = $(PERLPREFIX)/bin
> Makefile:INSTALLMAN1DIR = $(PERLPREFIX)/share/man/man1
> Makefile:INSTALLSITEMAN1DIR = $(SITEPREFIX)/share/man/man1
> Makefile:INSTALLVENDORMAN1DIR = $(VENDORPREFIX)/share/man/man1
> Makefile:INSTALLMAN3DIR = $(PERLPREFIX)/share/man/man3
> Makefile:INSTALLSITEMAN3DIR = $(SITEPREFIX)/share/man/man3
> Makefile:INSTALLVENDORMAN3DIR = $(VENDORPREFIX)/share/man/man3
> Makefile:       PREFIX="$(PREFIX)"
> Makefile:       cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL
> "PREFIX=/nas/reg" "LIB=/nas/reg/lib/perl"
> Makefile:       $(PERLRUN) Makefile.PL "PREFIX=/nas/reg" "LIB=/nas/reg/lib/perl"
> Makefile:               PREFIX=/nas/reg \
> inc/Module/Install/Makefile.pm: # PREFIX/PERL5LIB, and thus,
> install_share. Blank them if they exist
> 
> oh good.  maybe i can just run make.
> 
> nope:
> 
> $ make
> /usr/bin/perl "-Iinc" Makefile.PL --config=
> --installdeps=Convert::ASN1,0.07,Authen::SASL,2.00,URI::ldap,1.1,IO::Socket::SSL,0.93,XML::SAX::Writer,0
> *** Installing dependencies...
> *** You are not allowed to write to the directory
> '/usr/lib/perl5/site_perl/5.8.8';
>    the installation may fail due to insufficient permissions.
> 
> ==> Should we try to re-execute the autoinstall process with 'sudo'? [y]
> 
> what am i missing?
> 
> thanks.
> 
> -- 
> Live in a world of your own, but always welcome visitors.
> _______________________________________________
> SanFrancisco-pm mailing list
> SanFrancisco-pm at pm.org
> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm

Francisco Obispo 
email: fobispo at isc.org
Phone: +1 650 423 1374 || INOC-DBA *3557* NOC
Key fingerprint = 532F 84EB 06B4 3806 D5FA  09C6 463E 614E B38D B1BE







More information about the SanFrancisco-pm mailing list