Installed FreePBX on Debian 12 VM give error in install script

sudo ./install -n --dbuser asterisk --dbpass “asterisk”
Checking if SELinux is enabled…Its not (good)!
Reading /etc/asterisk/asterisk.conf…Done
Checking if Asterisk is running and we can talk to it as the ‘asterisk’ user…Yes. Determined
Asterisk version to be: 22.10.1
Checking if NodeJS is installed and we can get a version from it…Yes. Determined NodeJS
version to be: 18.20.4
Preliminary checks done. Starting FreePBX Installation
Checking if this is a new install…Yes (No /etc/freepbx.conf file detected)
Database installation checking credentials and permissions..Connected!
Empty asteriskcdrdb Database going to populate it
Initializing FreePBX Settings

In Config.class.php line 222:

SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘asterisk.freepbx_settings’
doesn’t exist

Anyone can help me with this?

The installation process expects to run everything as root, including setting up the databases and tables. You’re running things as a non-standard dbuser and that makes it hard for the installer to do it’s job. I’m not sure why you are doing this.