Installing Private Perl Modules

deadlock

Well-Known Member
May 12, 2002
58
0
306
I'm attempting to install some perl modules in a user directory for the first time (I usually just use WHM) but I'm having some trouble. I've tried various modules always with the same results. I've tried each of the following from my install directory ~/perl/install/Module-Name:

perl Makefile.PL PREFIX=~/perl
perl Makefile.PL PREFIX=/home/userdir/perl
perl Makefile.PL LIB=~/perl PREFIX=~/perl

That part seems to go fine, I've checked the Makefile and it looks good with the local directory in all the right places, but whenever I run 'make' it always tries to access a directory outside the user's dir tree like this:

/bin/pwd: cannot open directory `../../../..': Permission denied

One particular module gave this error during creation of the Makefile:

Can't figure out your cwd! at /usr/lib/perl5/5.8.8/ExtUtils/MakeMaker.pm line 168.

I checked to make sure the Cwd module is installed and it looks fine. I checked my environment variables and HOME is there.

I'm scratching my head, if anyone can even tell me where to start looking for the problem it would help because I'm stumped.
 

deadlock

Well-Known Member
May 12, 2002
58
0
306
Just run /scripts/perlinstaller <module>

as the user
Thanks, I tried to install LWP as user:

/scripts/perlinstaller LWP

... but it still reports:

/bin/pwd: cannot open directory `..': Permission denied

Why does it keep trying to access the parent directory (/home) during install? It goes on to (apparently) install the module and reports that it's done, these directories are created: /home/myuser/.cpan and /home/myuser/.cpcpan with source files in them and that kind of thing, but the actual module is not there. I should see LWP.pm in there somewhere when it's done, right?
 

Website Rob

Well-Known Member
Mar 23, 2002
1,504
1
318
Alberta, Canada
cPanel Access Level
Root Administrator
You have a permissions problem and I see the following possible solutions, as a workaround.

1. Install using WHM as usual. After all, if this account needs it maybe others could use it also.

2. Give the User Normal Shell access, login as that user and run your individual install commands again.


If all else fails, option 1 should resolve the issue and let you get on to other things.