Symptoms
When trying to use '/scripts/perlinstaller', it fails instantly with the following error:
Can't locate Cwd.pm in @INC (@INC contains: /usr/local/cpanel /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /usr/local/cpanel/Cpanel/cPCPAN.pm line 43.
Description
This is generally caused by the base Perl RPM being corrupt, you can validate that package with the following:
rpm -V $(rpm -qa | grep ^perl-5)
Workaround
If the above command returns output denoting that files are missing, similar to this:
rpm -V $(rpm -qa | grep ^perl-5)
S.5...... /usr/bin/a2p
S.5...... /usr/bin/perl
S.5...... /usr/bin/perl5.10.1
missing /usr/lib64/perl5/Cwd.pm
missing /usr/lib64/perl5/auto/Cwd/Cwd.so
SM5....T. /usr/share/perl5/ExtUtils/Command.pm
missing /usr/share/perl5/File/Spec.pm
missing /usr/share/perl5/File/Spec/Cygwin.pm
missing /usr/share/perl5/File/Spec/Epoc.pm
missing /usr/share/perl5/File/Spec/Functions.pm
missing /usr/share/perl5/File/Spec/Mac.pm
missing /usr/share/perl5/File/Spec/OS2.pm
missing /usr/share/perl5/File/Spec/Unix.pm
missing /usr/share/perl5/File/Spec/VMS.pm
missing /usr/share/perl5/File/Spec/Win32.pm
missing /usr/share/perl5/Net/Cmd.pm
missing /usr/share/perl5/Net/Config.pm
missing /usr/share/perl5/Net/Domain.pm
missing /usr/share/perl5/Net/FTP.pm
missing /usr/share/perl5/Net/FTP/A.pm
missing /usr/share/perl5/Net/FTP/E.pm
missing /usr/share/perl5/Net/FTP/I.pm
missing /usr/share/perl5/Net/FTP/L.pm
missing /usr/share/perl5/Net/FTP/dataconn.pm
missing /usr/share/perl5/Net/NNTP.pm
missing /usr/share/perl5/Net/Netrc.pm
missing /usr/share/perl5/Net/POP3.pm
missing /usr/share/perl5/Net/SMTP.pm
missing /usr/share/perl5/Net/Time.pm
missing /usr/share/perl5/Net/libnet.cfg
missing /usr/share/perl5/Net/libnetFAQ.pod
The package will need to be reinstalled. This can be done with:
yum reinstall $(rpm -qa | grep ^perl-5)