LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   perl module installation in custom location using cpanplus (https://www.linuxquestions.org/questions/linux-software-2/perl-module-installation-in-custom-location-using-cpanplus-881551/)

rohit.dhaval1 05-19-2011 03:07 AM

perl module installation in custom location using cpanplus
 
Hi,

I have installed perl5.12.3 in a custom location, ( a NFS share). I have all the libraries created in the same location. This was an attempt not to disturb existing version of perl. I have succeeded doing this.

Now, I need to install around 200 perl modules. I tried Bundle option in CPAN shell, it somehow did not work.

Does anyone here know off any other better method of installing multiple perl modules. How do I use CPANPLUS to install all the modules. What changes do I make to Config.pm considering custom location of perl installation I have done.

Your help will be greatly appreciated.

Thank you,

smallpond 05-21-2011 06:32 PM

I have been working with computers for a long time and have yet to see the error message "did not work" yet people persist in saying that is what happened when they ran a program. Programmers go to great lengths to report useful error messages and it is pointless to ignore them. Something happened -- maybe the program succeeded but installed the modules in the wrong place, for example, but I'm willing to bet that nothing printed "did not work" on the screen.

Most likely you were running the wrong perl version when you tried to install the bundles from CPAN, or your 5.12.3 version is installed incorrectly. In any case, what should work is:

Code:

<path to perl>/perl -MCPAN -e"install foo"
should install foo for the version of perl in <path to perl> provided that you built that perl with the config set up properly to point to that path so that perl can find its files.

rohit.dhaval1 08-16-2012 04:44 PM

Please follow any of the 4 methods according to your convenience


>>>> If you have the list of modules with you then, (you have to install cpanm first)
- Installing cpanm
wget http://search.cpan.org/CPAN/authors/...-1.5017.tar.gz
tar zxvf App-cpanminus-1.5017.tar.gz
cd App-cpanminus-1.5017
/bin/perl Makefile.PL
make ; make install

-- Installing the modules later

/bin/cpanm --scandeps <space separated moudle list>
/bin/cpanm -v --installdeps <space separated moudle list>
/bin/cpanm -v <space separated moudle list>



>>> If you already have a Bundle file created from machine which has all required modules installed

/bin/perl -MCPAN -e 'install Bundle::Snapshot_2011_07_25_00'


>>> Modules can be installed from cpan shell as well

/bin/perl -MCPAN -e shell
> install <module name>


>>> Lastly, go for manual installing all dependent modules


All times are GMT -5. The time now is 03:53 PM.