phoenix007 has asked for the wisdom of the Perl Monks concerning the following question:
How to install cpan module on specific Perl installation and on system default Perl ?
This is my first question here
Currently I am working on Ubuntu flavor of linux OS. I have default 5.26.1 version of Perl pre-installed. Output of perl -v command copy pasted below
This is perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-linux-gnu-thread-multiI have installed perl-5.8.9 using perlbrew and installed CPAN client cpanm. Now I am trying to install File::Find::Rule module then I am getting output mentioned below. Here I am not getting where this module got installed and how I can control module installation must be done in specific Perl installation
! ! Can't write to /usr/local/share/perl/5.26.1 and /usr/local/bin: Inst +alling modules to /home/kshitij/perl5 ! To turn off this warning, you have to do one of the following: ! - run me as a root or with --sudo option (to install to /usr/local +/share/perl/5.26.1 and /usr/local/bin) ! - Configure local::lib in your existing shell to set PERL_MM_OPT e +tc. ! - Install local::lib by running the following commands ! ! cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/per +l5/lib/perl5/ -Mlocal::lib) ! --> Working on File::Find::Rule Fetching http://www.cpan.org/authors/id/R/RC/RCLAMP/File-Find-Rule-0.3 +4.tar.gz ... OK Configuring File-Find-Rule-0.34 ... OK ==> Found dependencies: Number::Compare, Text::Glob --> Working on Number::Compare Fetching http://www.cpan.org/authors/id/R/RC/RCLAMP/Number-Compare-0.0 +3.tar.gz ... OK Configuring Number-Compare-0.03 ... OK Building and testing Number-Compare-0.03 ... OK Successfully installed Number-Compare-0.03 --> Working on Text::Glob Fetching http://www.cpan.org/authors/id/R/RC/RCLAMP/Text-Glob-0.11.tar +.gz ... OK Configuring Text-Glob-0.11 ... OK Building and testing Text-Glob-0.11 ... OK Successfully installed Text-Glob-0.11 Building and testing File-Find-Rule-0.34 ... OK Successfully installed File-Find-Rule-0.34 3 distributions installed
I have also tried switching Perl using perlbrew. Note : when I hit command perlbrew list it only lists perl-5.8.9
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Struggling in installaion of any module in Perl which is installed using perlbrew
by marto (Cardinal) on Oct 29, 2018 at 09:30 UTC | |
by haukex (Archbishop) on Oct 29, 2018 at 10:04 UTC | |
by phoenix007 (Sexton) on Oct 29, 2018 at 13:24 UTC | |
by phoenix007 (Sexton) on Oct 29, 2018 at 13:21 UTC | |
|
Re: Struggling in installaion of any module in Perl which is installed using perlbrew
by Haarg (Priest) on Oct 29, 2018 at 11:12 UTC |