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.

  3Comments

  1. zermok   •  

    very helpful thanks

  2. koral   •  

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

  3. Victor Kaiser-Pendergrast   •  

    Great job. Very frustrating when DNF and CPAN compete and break eachother.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.