On OCS 2.5 installed on Ubuntu 18.04.1, the perl version is 5.26.1. Perhaps the perl cache handling on older versions has a problem?
It's a nuclear option, but you could backup your database and retry ocs server installation with newer version of perl.