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.

Lost all perl modules

Discussion in 'General Discussion' started by npluis, Sep 18, 2012.

  1. npluis

    npluis Member

    Joined:
    Feb 21, 2007
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I lost all Perl modules. When I check Main >> Software >> Install a Perl Module it's all empty?

    Also if I login with ssh I get these errors:
    BEGIN failed--compilation aborted.
    Code:
    Can't locate File/Path.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.8/x86_64-linux /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl .) at /usr/local/lib/perl5/site_perl/5.8.8/local/lib.pm line 10.
    BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.8.8/local/lib.pm line 10.
    Compilation failed in require.
    How can I install all default Perl modules again?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You can use the following command to install the required Perl modules:

    Code:
    # /scripts/checkperlmodules
    However, the Perl modules should not have been deleted automatically. Were files or directories manually deleted from the server before you noticed this problem?

    Thank you.
     
  3. npluis

    npluis Member

    Joined:
    Feb 21, 2007
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    that give the following error:
    Code:
    Can't locate File/Path.pm in @INC (@INC contains: /usr/local/cpanel /usr/local/lib/perl5/5.8.8/x86_64-linux /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl /var/cpanel/updatelogs) at /usr/local/lib/perl5/5.8.8/CPAN/HandleConfig.pm line 4.
    BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.8.8/CPAN/HandleConfig.pm line 4.
    Compilation failed in require at /usr/local/lib/perl5/5.8.8/CPAN.pm line 19.
    BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.8.8/CPAN.pm line 19.
    Compilation failed in require at /scripts/checkperlmodules line 48.
    BEGIN failed--compilation aborted at /scripts/checkperlmodules line 48.
    
    No files were deleted (as far as I know). I did (try) to install some perl modules with
    Code:
    /scripts/perlinstaller 
    wich failed since I had Conserve memory On. After I switched it on there was a licence issue and since that is resolved I get this error.
     
  4. npluis

    npluis Member

    Joined:
    Feb 21, 2007
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    I found a File/Path.pm in /usr/share/perl5 and copied that to /usr/local/lib/perl5/5.8.8/x86_64-linux/File/

    After that I ran you command and now they are all back. However I'm still worried why this happened and if there could still be something wrong.
    Code:
    whereis perl
    
    returns
    Code:
    perl: /usr/bin/perl /usr/bin/perl.1347366159 /usr/local/bin/perl /usr/share/man/man1/perl.1.gz
    
    Is this normal?
     
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    It is normal actually. Can you run this command and provide the output?

    Code:
    ls -lah /usr/bin/perl /usr/local/bin/perl
     
  6. npluis

    npluis Member

    Joined:
    Feb 21, 2007
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    it returns:
    Code:
    lrwxrwxrwx. 1 root root  17 Sep 11 14:22 /usr/bin/perl -> ../local/bin/perl*
    -rwxr-xr-x. 2 root root 17K Sep 11 14:22 /usr/local/bin/perl*
    
     
  7. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    That is fine as /usr/bin/perl should be symlinked to /usr/local/bin/perl, which is what it shows.

    I cannot say why it happened in this instance then. I've seen issues where you have two perl binaries (one in /usr/bin/perl and one in /usr/local/bin/perl). This isn't happening on your machine, so not certain what happened on yours unfortunately.
     
Loading...

Share This Page