It seems that this is caused by Softaculous trying to connect to the real domain and if there's some sort of problem it would affect the parsing / replacement of the sql file during installation. The workaround that finally worked was to add the domain into /etc/hosts and point it to 127.0.0.1
The workaround in the previous post is not necessary.