There are many other answers on Stackoverflow for this error message. In short, modules that use C or C++ code are compiled against the version of perl you are using and have markers in them to check they are being used with that version. If you change the perl version (or compiler details in some cases), those won't work and you get that message.
Likewise, if you update the shared library that one of those compiled modules wants to use, you'll have a similar problem. For example, I have to keep around the openssl libraries I compiled against for a module that used those to keep working. If I update openssl (at the same location), I need to recompile the Perl modules that work against those.
CPAN.pm can recompile everything it knows you have installed:
cpan -r
Mostly this sort of thing happens when you are trying to share a module library outside of the default paths (say, like using local::lib
). Reinstall those modules too.
And, don't share that directory between different versions of perl, such as the system perl and one you installed through a different method.