cpan client tries to install non-existent version

Ran into an issue today and wanted to share in case anybody else hits the problem.

Using the good-old cpan client I found myself unable to install a module. It took me a while to track down the problem...

I had CPAN::SQLite installed and that appears to have a bug (which I filed as RT 69415):

If a greater version of a dist is removed from the CPAN, CPAN::SQLite will fail to reindex the "current" (lesser) version, which means the cpan client will spiral into a 404 loop and give up.

So if you try to install a module and cpan spews 404 errors for a different version than you're expecting, open up ~/.cpan/cpandb.sql with sqlite3 and delete that record with something like:

DELETE FROM dists WHERE dist_name = '?'

Leave a comment

About Randy Stauner

user-pic perl -C -E 'say"i \x{2764} ",($^X =~ m#([^/]+)$#)'