More CPAN issues in Fedora 20

Following on from may last post about CPAN in Fedora 20, I faced another problem on a machine I upgraded.  cpan would fail to load with the error:

Attempt to reload Scalar/Util.pm aborted.
Compilation failed in require at /usr/share/perl5/Safe.pm line 4.
BEGIN failed--compilation aborted at /usr/share/perl5/Safe.pm line 4.
Compilation failed in require at /usr/share/perl5/CPAN.pm line 56.
BEGIN failed--compilation aborted at /usr/share/perl5/CPAN.pm line 56.
Compilation failed in require at /usr/share/perl5/App/Cpan.pm line 218.
BEGIN failed--compilation aborted at /usr/share/perl5/App/Cpan.pm line 218.
Compilation failed in require at /bin/cpan line 9.
BEGIN failed--compilation aborted at /bin/cpan line 9.

The problem I found was in the List::Util library, this library needs to removed and reinstalled.  But you have to use yum (as CPAN is broken!)  In order to force yum to do its job, you need to remove the offending files first:

find /usr/ -wholename "*/List/Util*" -delete

After this force a reinstall using yum:

yum reinstall perl-Scalar-List-Utils -y

CPAN should then start running at this point.

  2Comments

  1. zermok   •  

    very helpful thanks

  2. koral   •  

    I had the same issue after upgrading to Fedora-20, and your suggestions worked perfectly. Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *