1
The problem is that the function checks for mainfile.php *and* whether XOOPS_VERSION is defined. Unfortunately, XOOPS_VERSION is not defined for the install routine. add to install/include/common.inc.php and re-run the install.
include_once '../include/version.php';