CPAN problems in Fedora 20

After a recent Fedora 20 update my Perl libraries are broken. This appears to be a common problem with Fedora updates.

When trying to use cpan it kept failing when building the database with error:

install_driver(SQLite) failed: Perl API version v5.16.0 of does not match v5.18.0 at /usr/lib64/perl5/ line 213, line 138944.
Compilation failed in require at (eval 45) line 3, line 138944. at /usr/local/share/perl5/CPAN/SQLite/ line 78.

This is caused by some old files that have moved location (“yum provides” shows no Fedora package installs this any more). Just remove that directory:

rm -rf /usr/local/share/perl5/CPAN/SQLite

And it all works fine.

I had some other problems using other Perl libs due to C API mismatch problems:

Perl API version v5.16.0 of HTML::Parser does not match v5.18.0 at /usr/share/perl5/ line 92.

This can simply be fixed by forcing a reinstall in cpan of the problem module:

force install HTML::Parser

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.