You shouldn't upgrade your Zentyal server from the command line (it's possible, but Zentyal uses some special options as Dpkg::Options:="--force-confdef" Dpkg::Options:="--force-confold" which modify the behavior of apt. If you want learn about this, read your /var/log/apt/history.log files) Use the "software Management" module instead.
In your case, zentyal-core post-installation script throws an error. It can't connect to the MySQL server ( MySQL server is one of the most annoying dependencies in the zentyal-core package
)
So you have to fix your MySQL server in order to fix your zentyal-core package.
First, you have to check if the MySQL server is running:
root@kh:~# systemctl status mysql
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: en
Active: active (running) since Tue 2020-08-04 15:37:43 CEST; 12min ago
Main PID: 849 (mysqld)
Tasks: 32 (limit: 4678)
CGroup: /system.slice/mysql.service
└─849 /usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid
ago 04 15:37:29 kh systemd[1]: Starting MySQL Community Server...
ago 04 15:37:43 kh systemd[1]: Started MySQL Community Server.
If this mysql service is down try starting it:
sudo systemctl start mysql
# check the service an other time to be sure that the MySQL is running
You can see the UNIX socket used by MySQL this way:
zenadmin@kh:~$ ss -unix | grep mysql
u_str ESTAB 0 0 /var/run/mysqld/mysqld.sock 26047 * 24943
PS: the command needed to configure an half-configured package is:
sudo dpkg --configure <package-name>
Let me know if you need some more detailed help.
Cheers!