0

I have installed Perl in directory "/srv/data203806/MUXmh-Migration/CPAN/localperl/". I have downloaded the tar file and unzipped it. Now how do I install CPAN modules manually to this Perl installation?

2
  • 1
    why do you have to do manual installation? Why can't you use the cpan or cpanm tools? How did you install that perl – the perlbrew script helps setting up your environment variables so that you can use multiple perls effectively. Commented Feb 25, 2014 at 8:20
  • I don't have access to root directory to install perl. Can I install in any other directory? also CPAN modules? Commented Feb 25, 2014 at 8:26

1 Answer 1

2

When you are installing a CPAN module as a non-root user then you should use the PREFIX option with Makefile.pl like this:

perl Makefile.PL PREFIX=<your directory>
make
make install

This will install the module in the directory you have specified with the PREFIX option.

Steps to install cpan module:

  1. Download the .gz file from cpan website
  2. Extract the .gz file
  3. Go to the extracted directory
  4. Run the following commands

    perl Makefile.pl PREFIX=<local directory you need>
    make
    make install
    
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks Raghu... Can I know how to install using CPAN to particular directory?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.