The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Installing Private Perl Modules

Discussion in 'General Discussion' started by deadlock, Jun 21, 2007.

  1. deadlock

    deadlock Well-Known Member

    Joined:
    May 12, 2002
    Messages:
    54
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
  2. albatroz

    albatroz Well-Known Member

    Joined:
    Mar 6, 2003
    Messages:
    258
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Virtual Orbis / Peru
    cPanel Access Level:
    Root Administrator
    Which Perl modules can be installed via WHM?
     
  3. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    Just run /scripts/perlinstaller <module>

    as the user
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Anything listed in the CPAN repository :)
     
  5. deadlock

    deadlock Well-Known Member

    Joined:
    May 12, 2002
    Messages:
    54
    Likes Received:
    0
    Trophy Points:
    6
    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?
     
  6. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    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.
     
  7. albatroz

    albatroz Well-Known Member

    Joined:
    Mar 6, 2003
    Messages:
    258
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Virtual Orbis / Peru
    cPanel Access Level:
    Root Administrator
    These are the modules I need to install. As you can see they are not from Cpan.
    Apache-Session-1.54.tar.gz
    Business-CreditCard-0.27.tar.gz

    How can I install them?
     
Loading...

Share This Page