[Canberra-pm] Trying to use cpan to install PERL modules into a non-root directory [SEC=UNCLASSIFIED]

John.Hockaday at ga.gov.au John.Hockaday at ga.gov.au
Sun Feb 24 15:14:24 PST 2008


Hi All,

Thanks to you all for the quick response.  

I'm glad to see that I'm not the only one that has problems with getting
local module installs to work.  It makes me feel less inferior.  ;--)

I am trying to get the DBI, DBD and Oracle packages loaded.  I seems like I
will need to load perl 5.8.8 into my local directories and then ask the IT
people to copy the results over to their /opt/csw/lib/perl/site_perl
directories once I have tested them.  If only I had root or sudo permissions.
;--)

I have downloaded the DBI and unzipped and un tarred it into a local
directory.  I see two DBI.pm files.  They are:

./DBI-1.602/DBI.pm
./DBI-1.602/lib/Bundle/DBI.pm

Which one of these do I ask to be copied over to the
/opt/csw/lib/perl/site_perl directory?

Thanks.


John

> -----Original Message-----
> From: Jepri [mailto:jepri at alphacomplex.org] 
> Sent: Saturday, 23 February 2008 8:07 PM
> To: Hockaday John
> Cc: canberra-pm at pm.org
> Subject: Re: [Canberra-pm] Trying to use cpan to install PERL 
> modules into a non-root directory [SEC=UNCLASSIFIED]
> 
> 
> First up, your make should be fine, all the problems happened in 
> Makefile.PL.
> 
> * The error messages indicate that you are trying to rebuild a core 
> module, which requires the full perl source.  Clearly you 
> don't have the 
> full perl source or it has been moved somewhere inconvenient.
> 
> Were you trying to upgrade DBI or were you using DBI as an 
> example?  If 
> you must do upgrade this, I'd suggesting keeping a full local 
> install of 
> perl in your directory.
> 
> * If you are trying to install a pure perl module (i.e. one that only 
> contains perl code, not C code), you can unpack the module 
> tar file and 
> copy the .pm files into your script directory.  Then add use 
> lib '.'; to 
> the top of your program.
> 
> You may need to get the directories right. e.g. 
> CGI::Application needs 
> to go in scriptdir/CGI/Application.pm
> 
> 
> 
> I never had much luck getting local module installs to work, 
> so best of 
> luck.
> 
> BTW if you are going to be building a lot of supporting libraries, I 
> heartily recommend pkgsrc for Solaris.
> 
> http://www.netbsd.org/docs/pkgsrc/platforms.html
> 
> 
> 
> John.Hockaday at ga.gov.au wrote:
> > Hi All,
> > 
> > Sorry to bother you again.  Our IT section is too busy to 
> load some PERL CPAN
> > modules for me so I thought that I would use cpan to load 
> some modules into a
> > local directory so that I can start using them.
> > 
> > I don't have root permission and latest perl is in:
> > 
> > 	/opt/csw/bin/perl
> > 
> > It is PERL 5.8.8.
> > 
> > We also have versions PERL 5.00503 loaded into:
> > 
> > 	/web/apps/perl/perl5/5.00503/
> > 
> > If I do a cpan DBI on a command line I get the following:
> > 
> > ###############
> > ...
> >   CPAN.pm: Going to build T/TI/TIMB/DBI-1.602.tar.gz
> > ...
> > 
> > Checking if your kit is complete...
> > Looks good
> > 'INSTALLLIB' is not a known MakeMaker parameter name.
> > 'INSTALL_BASE' is not a known MakeMaker parameter name.
> > 'PERL_INC' is not a known MakeMaker parameter name.
> > 
> > You cannot build extensions below the perl source tree 
> after executing
> > a 'make clean' in the perl source tree.
> > To rebuild extensions distributed with the perl source you should
> > simply Configure (to include those extensions) and then 
> build perl as
> > normal. After installing perl the source tree can be deleted. It is
> > not needed for building extensions by running 'perl Makefile.PL'
> > usually without extra arguments.
> > 
> > It is recommended that you unpack and build additional 
> extensions away
> > from the perl source tree.
> > Warning: PERL_LIB (/opt/csw/lib/perl/lib) seems not to be a 
> perl library
> > directory
> >         (Exporter.pm not found) at
> > /opt/csw/share/perl/5.8.8/ExtUtils/MM_Unix.pm
> >  line 1668.
> > 
> >     I see you're using perl 5.008008 on 
> sun4-solaris-thread-multi, okay.
> >     Remember to actually *read* the README file!
> >     Use  'make' to build the software (dmake or nmake on Windows).
> >     Then 'make test' to execute self tests.
> >     Then 'make install' to install the DBI and then delete 
> this working
> >     directory before unpacking and building any DBD::* drivers.
> > 
> > Writing Makefile for DBI
> > make: *** No rule to make target 
> `/opt/csw/lib/perl/config.sh', needed by
> > `/opt/csw/lib/perl/lib/Config.pm'.  Stop.
> >   /usr/local/bin/make  -- NOT OK
> > Running make test
> >   Can't test without successful make
> > Running make install
> >   make had returned bad status, install seems impossible
> > #######################
> > 
> > I see three problems here. 
> > 
> > 1. cpan is finding perl 5.008008 and not perl 5.8.8 in 
> /opt/csw/bin/perl.
> > 
> > 2. cpan doesn't like /usr/local/bin/make on the SunOS marl 5.8
> > Generic_117350-49 sun4u sparc SUNW,Sun-Fire-480R platform.
> > 
> > 3. cpan doesn't recognise the parameters that I have passed 
> to 'makepl_arg'
> > yet they are valid in the MakeMaker documentation.
> > 
> > 
> > I seem to remember that Sun make files are no good and that 
> we need to use
> > something like gcc but I can't remember the details.  Can 
> anyone help?
> >   
> > Also, what settings to I use in 'makepl_arg' to get cpan to use 
> > 
> > 	/opt/csw/bin/perl to find the binaries,
> > 	/opt/csw/lib/perl to find the perl libraries,
> > 	/opt/csw/lib/perl/site_perl to find some CPAN modules,
> > 
> > 	/public/data/asddgate/bin/perl for any new binaries,
> > 	/public/data/asddgate/lib/perl for any new libraries,
> > 	/public/data/asddgate/lib/perl/site_perl for the CPAN Modules,
> > 	/public/data/asddgate/man for the man pages.
> > 
> > Note that the /opt/csw/ directories are owned by root and I 
> can't write to
> > them.  Hence my need to load packages into /public/data/asddgate/...
> > 
> > Your help will be greatly appreciated.
> > 
> > I have configured cpan as follows:
> > 
> > $CPAN::Config = {
> >   'build_cache' => q[0],
> >   'build_dir' => q[/public/asddadm/.cpan/build],
> >   'cache_metadata' => q[1],
> >   'cpan_home' => q[/public/asddadm/.cpan],
> >   'dontload_hash' => {  },
> >   'ftp' => q[/usr/bin/ftp],
> >   'ftp_proxy' => q[proxy.agso.gov.au:8080],
> >   'getcwd' => q[cwd],
> >   'gpg' => q[/opt/csw/bin/gpg],
> >   'gzip' => q[/opt/csw/bin/gzip],
> >   'histfile' => q[/public/asddadm/.cpan/histfile],
> >   'histsize' => q[100],
> >   'http_proxy' => q[proxy.agso.gov.au:8080],
> >   'inactivity_timeout' => q[0],
> >   'index_expire' => q[1],
> >   'inhibit_startup_message' => q[0],
> >   'keep_source_where' => q[/public/asddadm/.cpan/sources],
> >   'lynx' => q[ ],
> >   'make' => q[/usr/local/bin/make],
> >   'make_arg' => q[],
> >   'make_install_arg' => q[],
> >   'makepl_arg' => q[PREFIX=/public/data/asddgate 
> PERL_INC=/opt/csw/bin/perl
> > PERL
> > _SRC=/opt/csw/lib/perl INSTALLBIN=/public/data/asddgate/bin/perl
> > INSTALLLIB=/pub
> > lic/data/asddgate/lib/perl INSTALL_BASE=/public/data/asddgate],
> >   'ncftpget' => q[/usr/local/bin/ncftpget],
> >   'no_proxy' => q[proxy.agso.gov.au:8080],
> >   'pager' => q[/usr/bin/less],
> >   'prerequisites_policy' => q[follow],
> >   'proxy_pass' => q[D847vt],
> >   'proxy_user' => q[asddadm],
> >   'scan_cache' => q[atstart],
> >   'shell' => q[/usr/bin/sh],
> >   'tar' => q[/usr/local/bin/tar],
> >   'term_is_latin' => q[1],
> >   'unzip' => q[/usr/bin/unzip],
> >   'urllist' => [q[http://cpan.mirrors.ilisys.com.au]],
> >   'wget' => q[/opt/csw/bin/wget],
> > };
> > 1;
> > __END__
> > 
> > 
> > Thanks.
> > 
> >  John Hockaday
> >  john.hockaday\@ga.gov.au
> > _______________________________________________
> > Canberra-pm mailing list
> > Canberra-pm at pm.org
> > http://mail.pm.org/mailman/listinfo/canberra-pm
> 


More information about the Canberra-pm mailing list