Massive Perl issues from previous maintainer

vantagex4

Member
Feb 5, 2012
6
0
51
cPanel Access Level
Root Administrator
I'm not sure who set up the server that I've been tasked with refreshing, but the Perl modules are all messed up. I've spent several hours reading up on fixes for Perl problems with relation to cPanel and though I've tried everything I can find, I haven't come across anything that fixes this particular brand of aggravating issue.

I would like to reinstall perl from source (from http://layer2.cpanel.net/perl588installer.tar.gz, as recommended by several articles and posts in this forum), but I get the following error:
Code:
String found where operator expected at /usr/local/cpanel/SelectSaver.pm line 42, near "croak 'usage: new SelectSaver [FILEHANDLE]'"
        (Do you need to predeclare croak?)
syntax error at /usr/local/cpanel/SelectSaver.pm line 42, near "croak 'usage: new SelectSaver [FILEHANDLE]'"
Compilation failed in require at /usr/local/cpanel/IO/Handle.pm line 265.
BEGIN failed--compilation aborted at /usr/local/cpanel/IO/Handle.pm line 265.
Compilation failed in require at /usr/local/cpanel/Socket.pm line 11.
BEGIN failed--compilation aborted at /usr/local/cpanel/Socket.pm line 11.
Compilation failed in require at /usr/local/cpanel/Cpanel/HttpRequest.pm line 10.
BEGIN failed--compilation aborted at /usr/local/cpanel/Cpanel/HttpRequest.pm line 10.
Compilation failed in require at /scripts/cpfetch line 9.
BEGIN failed--compilation aborted at /scripts/cpfetch line 9.
Unable to retrieve Perl source at ./install line 52.
Additionally (and as expected), I can't use cpan to install the module. Also, all of the SelectSaver.pm files that I've tried have produced the same result.

I have cPanel/WHM version 11.30.5.6 running on CENTOS 5.7 i686 (virtuozzo)

/scripts/perlinstaller and /scripts/checkperlmodules fail with the exact same error. Clearly SelectSaver, which appears to be a module that handles file handles, is quite important and is a prerequisite for these other Perl scripts.

I rarely have to post in a forum to get help with issues, so this is indeed a somewhat desperate plea for assistance (I'm going insane with this one).

Below is my perl -V output:

Code:
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
  Platform:
    osname=linux, osvers=2.6.18-028stab070.14, archname=i686-linux
    uname='linux vps.xxx.xxx.xxx.xxx.com 2.6.18-028stab070.14 #1 smp thu nov 18 16:04:02 msk 2010 i686 i686 i386 gnulinux '
    config_args='-ds -e -Dprefix=/usr/local'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='-O2',
    cppflags='-fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -I/usr/include/gdbm'
    ccversion='', gccversion='4.1.2 20080704 (Red Hat 4.1.2-51)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/libc-2.5.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.5'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options: PERL_MALLOC_WRAP USE_LARGE_FILES USE_PERLIO
  Built under linux
  Compiled at Feb  4 2012 18:41:15
  @INC:
    /usr/local/lib/perl5/5.8.8/i686-linux
    /usr/local/lib/perl5/5.8.8
    /usr/local/lib/perl5/site_perl/5.8.8/i686-linux
    /usr/local/lib/perl5/site_perl/5.8.8
    /usr/local/lib/perl5/site_perl
    .

Thanks! Let me know if there's any other information you need.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
None of my servers have /usr/local/cpanel/SelectSaver.pm file on them. The SelectSaver.pm files are in these locations:

/home/installd/perl588installer/perl-5.8.8/lib/SelectSaver.pm
/usr/lib/perl5/5.8.8/SelectSaver.pm
/usr/local/lib/perl5/5.8.8/SelectSaver.pm

Here is line 42 in each of these locations on my CentOS 5.7, cPanel 11.30.5.6 machine:

Code:
@_ >= 1 && @_ <= 2 or croak 'usage: new SelectSaver [FILEHANDLE]';
I suggest moving that /usr/local/cpanel/SelectSaver.pm file to /usr/local/cpanel/SelectSaver.pm.bak on the cPanel machine and re-attempting to run the commands you've indicated.
 

vantagex4

Member
Feb 5, 2012
6
0
51
cPanel Access Level
Root Administrator
Thanks for your reply. I renamed the file as suggested and attempted to install SelectSaver via both CPAN and /scripts/perlinstaller. Here is the result:

Code:
[email protected] [~/localperl]# /scripts/perlinstaller SelectSaver
Can't locate SelectSaver.pm in @INC (@INC contains: /usr/local/cpanel /usr/local/lib/perl5/5.8.8/i686-linux /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/i686-linux /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl .) at /usr/local/cpanel/IO/Handle.pm line 265.
BEGIN failed--compilation aborted at /usr/local/cpanel/IO/Handle.pm line 265.
Compilation failed in require at /usr/local/cpanel/Socket.pm line 11.
BEGIN failed--compilation aborted at /usr/local/cpanel/Socket.pm line 11.
Compilation failed in require at /usr/local/cpanel/Cpanel/HttpRequest.pm line 10.
BEGIN failed--compilation aborted at /usr/local/cpanel/Cpanel/HttpRequest.pm line 10.
Compilation failed in require at /usr/local/cpanel/Cpanel/cPCPAN.pm line 107.
and

Code:
[email protected] [~/localperl]# cpan SelectSaver
Can't locate SelectSaver.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.8/i686-linux /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/i686-linux /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl /root/localperl) at /usr/local/lib/perl5/5.8.8/i686-linux/IO/File.pm line 132.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.8.8/i686-linux/IO/File.pm line 132.
Compilation failed in require at /usr/local/lib/perl5/5.8.8/FileHandle.pm line 9.
Compilation failed in require at /usr/local/lib/perl5/5.8.8/CPAN.pm line 36.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.8.8/CPAN.pm line 36.
Compilation failed in require at /usr/local/bin/cpan line 175.
BEGIN failed--compilation aborted at /usr/local/bin/cpan line 175.
What is with this location: /usr/local/cpanel/Cpanel/cPCPAN.pm
Are there competing perl installations apart from the ones that should be present? I know cPanel uses its own perl distribution.
 

vantagex4

Member
Feb 5, 2012
6
0
51
cPanel Access Level
Root Administrator
I had posted a reply to this thread earlier but it still hasn't shown up, so I suppose its in limbo.

Thanks for your reply. I did as you suggested and renamed SelectSaver.pm then re-ran the scripts. Here's the output from the CPAN install:
Code:
[email protected] [~/localperl]# cpan SelectSaver
Can't locate SelectSaver.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.8/i686-linux /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/i686-linux /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl /root/localperl) at /usr/local/lib/perl5/5.8.8/i686-linux/IO/File.pm line 132.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.8.8/i686-linux/IO/File.pm line 132.
Compilation failed in require at /usr/local/lib/perl5/5.8.8/FileHandle.pm line 9.
Compilation failed in require at /usr/local/lib/perl5/5.8.8/CPAN.pm line 36.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.8.8/CPAN.pm line 36.
Compilation failed in require at /usr/local/bin/cpan line 175.
BEGIN failed--compilation aborted at /usr/local/bin/cpan line 175.
And from the /scripts/perlinstaller shell script:
Code:
[email protected] [~/localperl]# /scripts/perlinstaller SelectSaver
Can't locate SelectSaver.pm in @INC (@INC contains: /usr/local/cpanel /usr/local/lib/perl5/5.8.8/i686-linux /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/i686-linux /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl .) at /usr/local/cpanel/IO/Handle.pm line 265.
BEGIN failed--compilation aborted at /usr/local/cpanel/IO/Handle.pm line 265.
Compilation failed in require at /usr/local/cpanel/Socket.pm line 11.
BEGIN failed--compilation aborted at /usr/local/cpanel/Socket.pm line 11.
Compilation failed in require at /usr/local/cpanel/Cpanel/HttpRequest.pm line 10.
BEGIN failed--compilation aborted at /usr/local/cpanel/Cpanel/HttpRequest.pm line 10.
Compilation failed in require at /usr/local/cpanel/Cpanel/cPCPAN.pm line 107.
And here is the output from when I tried to run perl588installer/install:
Code:
[email protected] [/usr/src/perl588installer]# ./install
Can't locate SelectSaver.pm in @INC (@INC contains: /usr/local/cpanel /usr/local/lib/perl5/5.8.8/i686-linux /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/i686-linux /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl .) at /usr/local/cpanel/IO/Handle.pm line 265.
BEGIN failed--compilation aborted at /usr/local/cpanel/IO/Handle.pm line 265.
Compilation failed in require at /usr/local/cpanel/Socket.pm line 11.
BEGIN failed--compilation aborted at /usr/local/cpanel/Socket.pm line 11.
Compilation failed in require at /usr/local/cpanel/Cpanel/HttpRequest.pm line 10.
BEGIN failed--compilation aborted at /usr/local/cpanel/Cpanel/HttpRequest.pm line 10.
Compilation failed in require at /scripts/cpfetch line 9.
BEGIN failed--compilation aborted at /scripts/cpfetch line 9.
Unable to retrieve Perl source at ./install line 52.
What's up with this path: /usr/local/cpanel/Cpanel/
Is it meant to be nested like that?

My line 42 is identical to your line 42. Note that the same error occurs if I try to use cPanels perl588installer
 
Last edited:

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
Do you have SelectServer.pm anywhere on your machine other than in the location where you moved the one file? Check the line I posted to compare to the file you moved and also try to find another copy. Place that copy into the locations I noted it is on my machine.

As for competing perl installations, what do you show for the following?

Code:
ls -lah /usr/bin/perl /usr/local/bin/perl
 

vantagex4

Member
Feb 5, 2012
6
0
51
cPanel Access Level
Root Administrator
I do have more than one SelectSaver, here's some information about them.

First, the result of ls -lah /usr/bin/perl /usr/local/bin/perl
Code:
[email protected] [~]# ls -lah /usr/lib/perl /usr/local/lib/perl
/bin/ls: /usr/lib/perl: No such file or directory
/bin/ls: /usr/local/lib/perl: No such file or directory
Here's the result of a find, with the versions of each individual script:
Code:
[email protected] [/home/vantagex4]# find / -name SelectSaver.pm
/usr/src/perl-5.8.9/lib/SelectSaver.pm [B]version 1.01[/B]
/usr/lib/perl5/5.8.8/SelectSaver.pm [B]version 1.01[/B]
/home/vantagex4/perl5/lib/perl5/i686-linux/SelectSaver.pm [B]version 1.00[/B]
/root/localperl/lib/5.14.2/SelectSaver.pm [B]version 1.02[/B]
/root/localperl/lib/5.8.9/SelectSaver.pm [B]1.01[/B]
Your version appears to be version 1.01, but I tried all three of them in each of the places and got the same error message.

This is the top of the stack error:
Code:
 /home/vantagex4/perl5/lib/perl5/i686-linux/SelectSaver.pm line 42, near "croak 'usage: new SelectSaver [FILEHANDLE]'" (Do you need to predeclare croak?)
So I have tried SelectSaver.pm 1.01, which is from perl 5.8.8, in the location noted in the stack trace with the same results.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
Could you re-run this command, since you tried lib rather than bin:

Code:
ls -lah /usr/bin/perl /usr/local/bin/perl
 

vantagex4

Member
Feb 5, 2012
6
0
51
cPanel Access Level
Root Administrator
Sure, here's the output:

Code:
[email protected] [/root/src]# ls -lah /usr/bin/perl /usr/local/bin/perl
lrwxrwxrwx 1 root root   19 Feb  5 13:59 /usr/bin/perl -> /usr/local/bin/perl*
-rwxr-xr-x 2 root root 978K Feb  4 18:43 /usr/local/bin/perl*
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
That appears to be correct. Would you be able to open up a new ticket concerning this issue? You could submit a ticket using WHM > Support Center > Contact cPanel or using the link in my signature. Please post the ticket number here upon submitting one. Thanks!
 

vantagex4

Member
Feb 5, 2012
6
0
51
cPanel Access Level
Root Administrator
Yes, however I have just realized that we have an identical VPS from which I can probably copy the perl binaries. I'm going to give that a shot, and if it doesn't work I will trouble you all with a ticket. Thanks again for your assistance.