CPAN broken after update to cPanel 58

RWH Tech

Well-Known Member
Oct 1, 2015
86
16
8
Brazil
cPanel Access Level
Root Administrator
EDIT: After some looking, this must've happened during the WHM 56->58 migration.
After migrating to EA4, I got a message about broken RPMs for spamassassin and munin. Figured I'd try installing them via command line cpan, instead of running the script, and I get this:

[email protected] [~]# cpan
-bash: /root/perl5/bin/cpan: /usr/local/cpanel/3rdparty/perl/514/bin/perl: bad interpreter: No such file or directory

On my test machine, with fresh 58 and EA4, it runs just fine.
Installing and removing perl modules via the UI works fine, but I'm afraid some script will break if this isn't fixed. Any suggestions?
 
Last edited:

RWH Tech

Well-Known Member
Oct 1, 2015
86
16
8
Brazil
cPanel Access Level
Root Administrator
Thanks for the info.
I've verified that the package is installed, even went as far as reinstall it with rpm and uninstall/reinstall with yum. upcp ran fine, too.

If I knew where cpan is picking up that path, I could change it by hand. I've tried grepping /usr and /home, but didn't find it. Will do some more digging, later.

Perl got moved from 5.14 to 5.22 in 56, so I reckon I just haven't used cpan since then.
 

RWH Tech

Well-Known Member
Oct 1, 2015
86
16
8
Brazil
cPanel Access Level
Root Administrator
I went ahead and did a
ln -s /usr/local/cpanel/3rdparty/perl/522/bin/perl /usr/local/cpanel/3rdparty/perl/514/bin/perl
as an interim workaround until the issue is resolved.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,903
2,237
463
After migrating to EA4, I got a message about broken RPMs for spamassassin and munin. Figured I'd try installing them via command line cpan, instead of running the script, and I get this:
Hello,

Keep in mind that "cpan" is not a tool utilized to install RPMs via the command line. Instead, the "check_cpanel_rpms" script is used to install missing cPanel RPMS:

check_cpanel_rpms script

Would you mind opening a support ticket using the link in my signature so we can take a closer look and determine why your system Perl stopped working after the update? You can post the ticket number here so we can update this thread with the outcome.

Thank you.
 

RWH Tech

Well-Known Member
Oct 1, 2015
86
16
8
Brazil
cPanel Access Level
Root Administrator
I've opened ticket 7609441.

PS: System perl is fine, just cpan is looking for 514 when 522 is there.

[email protected] [~]# perl -v

This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
(with 29 registered patches, see perl -V for more detail)
 

RWH Tech

Well-Known Member
Oct 1, 2015
86
16
8
Brazil
cPanel Access Level
Root Administrator
The Cpanel tech determined that the cpan executable was from an old install and didn't do well without that perl 514 dir.
The fix was easy, since the cpanel-provided cpan existed: rm -f the extraneous cpan.