For XM topology.
Please make sure that you have this in your web.config
<!-- [...] -->
<add key="sxaxm:define" value="sxaxmonly"/>
It should be added automatically during SXA installation, not sure why in your case it wasn't.
<?xml version="1.0" encoding="utf-...
After using the other fixes mentioned in here, my install continued to fail because I didn't have MSSQL Server 2016 SP1 installed and configured properly. I figured that out by looking in the Event Viewer and noticing SQL exceptions.