Problem with reinstalling freepbx

There’s a bug with the recent version, you may use this workaround until there’s a fix:

EDIT:

This may be relevant too, could be the reason for not installing freepbx:

EDIT2:

Here’s a complete list of dirs/files to remove:

It includes /etc/amportal.conf and /etc/freepbx.conf.