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/DynaLoader.pm line 213, line 138944. Compilation failed in require at (eval 45) line 3, line 138944. at /usr/local/share/perl5/CPAN/SQLite/DBI.pm 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/XSLoader.pm line 92.
This can simply be fixed by forcing a reinstall in cpan of the problem module:
cpan
force install HTML::Parser