exim: error while loading shared libraries: libperl.so: wrong ELF class: ELFCLASS32

So I ran into a very odd issue with a server today where exim would not start after a CentOS upgrade. The error message was such:

exim: error while loading shared libraries: libperl.so: wrong ELF class: ELFCLASS32

This error took awhile to google around for and I couldn’t find any relevant articles. The problem seemed to obviously be the libperl.so file but perl seemed fine and the file was identical to other server setups with the same version of perl, exim, cPanel, CentOS. I decided to try and rebuild exim with /scripts/eximup –force but that did nothing to help the situation. Eventually, I found the following command:

/scripts/eximup --source

To the best of my knowledge I gained from my research, this recompiles exim from source, converts to an rpm, then installs that. Sure enough, that fixed the issue and exim was running again with no issues. I figured I’d make this post due to the fact I couldn’t find one post with the information I needed.