viswa79 has asked for the wisdom of the Perl Monks concerning the following question:

I am a beginner in perl. I have been trying to install perl modules XML::RegExp in my local directory. I followed a lot of literature on the web. I used the sequence given by all of them: 1. Download and untar and unzip the module 2. cd to the directory /home/daitav/xml/temp/XML-RegExp-0.03 3. perl Makefile.PL PREFIX=/home/daitav/xml/temp With this I tried LIB=/home/daitav/xml/temp once and INSTALLDIRS=/temp options at different time. 4. make 5. make test 6. make install. When I executed the last command I am always getting an error that I am unable to write to the the place where actual perl libraries are sitting and this does not point to my local directory(I donot recall the path but these were what I found to be present in the @INC variable). I tried finding out installation directory after using PREFIX=/home/daitav/xml/temp. I got an 'undefined' for the installuserbindirs. If I use the INSTALLDIR cmd line option then I get make error that pure_temp_install rule was not found by pure_install which is called in Makemaker.pm. I am unable to figure out where I am going wrong or what I doing incorrect? Could you please let me know what is the mistake I have committed? I am in an urgent need to use this. Looking forward to your early responses, Thanks, Viswa.
  • Comment on Query about installing perl modules in local directory

Replies are listed 'Best First'.
Re: Query about installing perl modules in local directory
by Joost (Canon) on Jul 28, 2007 at 20:13 UTC
    If you're specifying a PREFIX, you don't need to specify LIB or INSTALLDIRS:
    $ perl Makefile.PL PREFIX=/tmp Checking if your kit is complete... Looks good Writing Makefile for XML::RegExp $ make cp lib/XML/RegExp.pm blib/lib/XML/RegExp.pm Manifying blib/man3/XML::RegExp.3 $ make install Installing /tmp/lib/perl5/site_perl/5.8.8/XML/RegExp.pm Installing /tmp/man/man3/XML::RegExp.3 Writing /tmp/lib/perl5/site_perl/5.8.8/i686-linux-thread-multi/auto/XM +L/RegExp/.packlist Appending installation info to /tmp/lib/perl5/5.8.8/i686-linux-thread- +multi/perllocal.pod
    updated: better formatting
      Thanks for your reply. However I stilll get the following error: Warning: You do not have permissions to install into /usr/perl5/site_perl/5.005/sun4-solaris at /usr/perl5/5.00503/ExtUtils/Install.pm line 61. mkdir /usr/perl5/5.00503/man: Permission denied at /usr/perl5/5.00503/ExtUtils/Install.pm line 57 make: *** pure_site_install Error 2 I just donot know why I am getting this. Do I need to send any environment variables. I am unable to understand and I really need help on this front. Daita