5
1) the install process creates the "mainfile.php" for you. If you don't have it, i.e. that the installation was NOT successful. You do NOT use/modify the "mainfile.dist.php" - that's only for XOOPS.
2) During installation, you specify where the lib and data paths are, so the system can check if they exist. If they are not, the process will not continue. So making changes after the installation manually is risky, unless you know what you're doing.
My recommendation: install again, with the correct paths provided to XOOPS during installation.