I was getting this error while trying to install mysql-server on my system.
I have used this command: sudo apt install mysql-server
update-alternatives: using /var/lib/mecab/dic/ipadic-utf8 to provide /var/lib/mecab/dic/debian (mecab-dictionary) in auto modeSetting up mysql-server-8.0 (8.0.36-0ubuntu0.20.04.1) ...update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto modeRenaming removed key_buffer and myisam-recover options (if present)mysqld will log errors to /var/log/mysql/error.logmysqld is running as pid 11499dpkg: error processing package mysql-server-8.0 (--configure): installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1dpkg: dependency problems prevent configuration of mysql-server: mysql-server depends on mysql-server-8.0; however: Package mysql-server-8.0 is not configured yet.dpkg: error processing package mysql-server (--configure): dependency problems - leaving unconfiguredNo apport report written because the error message indicates its a followup error from a previous failure. Processing triggers for systemd (245.4-4ubuntu3.23) ...Processing triggers for man-db (2.9.1-1) ...Processing triggers for libc-bin (2.31-0ubuntu9.16) ...Errors were encountered while processing: mysql-server-8.0 mysql-serverE: Sub-process /usr/bin/dpkg returned an error code (1)Installing mysql-server.
I have tried this commands already.
sudo apt-get purge mysql*sudo apt-get autoremovesudo apt-get autocleansudo apt-get dist-upgradesudo apt-get install mysql-server