I lost web site statistics a few of weeks ago, following an ‘upgrade’ to the awstats package (shortly before OpenBSD 6.6 was launched). The subsequent upgrade to 6.6 did not fix the issue.
Awstats is written in perl. I know sod all about perl. The error message was the Encode module, version 2.98, was expected, when version 2.97 was found.
I soon discovered that the issue had also broken my mail server. It uses dkimproxy to sign outgoing mail, to verify my mail comes from my domain. Dkimproxy, it appears, also uses the Encode package, so broke too.
After a few weeks of swearing at perl, and going bald again, the problem turned out to be nothing to do with perl, and never mind the error message. I found that my system had Encode 2.98 installed, as part of the operating system. However, the awstats package under openbsd listed decode as a dependency, and that pulled in Encode … 2.97. WTF?! Awstats understandably became broken, as did some other packages.
Since I know nothing about Perl, I couldn’t work out a sophisticated, all–round clever solution. For now, I’ve just hacked it: I renamed the faulty Encode module (Encode.pm and the Encode directory) by appending .borked, and everything now works. This is a nasty hack, though, because at some point the package manager is going to notice that a package it’s installed incorrectly is misplaced.
It’s clear that my package database has got corrupted. I have to fix it, but I don’t know how: it seems openbsd has nothing equivalent to centos’s ‘yum clean all’. There will be a mechanism to do this, and I’ll find it. But, right now, at least awstats now works.