Unable to access FreePBX web page

Hi, im installing freepbx 16 and asterisk 20.11 in an ubuntu 20.04 machine. When i try to open the GUI page it doesnt show anything and i get this message

Exception thrown with message “SQLSTATE[HY000] [2002] No such file or directory::SQLSTATE[HY000] [2002] No such file or directory”

Stacktrace:
#7 Exception in /var/www/html/admin/libraries/utility.functions.php:120
#6 die_freepbx in /var/www/html/admin/libraries/BMO/Database.class.php:150
#5 PDOException in /var/www/html/admin/libraries/BMO/Database.class.php:144
#4 PDO:__construct in /var/www/html/admin/libraries/BMO/Database.class.php:144
#3 FreePBX\Database:__construct in /var/www/html/admin/libraries/BMO/FreePBX.class.php:77
#2 FreePBX:__construct in /var/www/html/admin/bootstrap.php:144
#1 require_once in /etc/freepbx.conf:10
#0 include_once in /var/www/html/admin/config.php:131

Why don’t you install FreePBX 17 on Debian 12. A script is already present installing it.
You can install it on Ubuntu if the root is the same getting the same script. It can work too.