Guys sorry for the harsh tone I am just simply want to solve this issue asap.
steps I took:
sudo apt-get update sudo apt-get install mysql-server
errors I got :
Setting up mysql-server-5.7 (5.7.29-0ubuntu0.18.04.1) ... update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode Renaming removed key_buffer and myisam-recover options (if present) dpkg: error processing package mysql-server-5.7 (--configure): installed mysql-server-5.7 package post-installation script subprocess returned error exit status 1 No apport report written because the error message indicates its a followup error from a previous failure. dpkg: dependency problems prevent configuration of mysql-server: mysql-server depends on mysql-server-5.7; however: Package mysql-server-5.7 is not configured yet. dpkg: error processing package mysql-server (--configure): dependency problems - leaving unconfigured Processing triggers for libc-bin (2.27-3ubuntu1) ... Processing triggers for systemd (237-3ubuntu10.39) ... Processing triggers for man-db (2.8.3-2ubuntu0.1) ... Processing triggers for ureadahead (0.100.0-21) ... Errors were encountered while processing: mysql-server-5.7 mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1)
I did a simple google search about the main error :
E: Sub-process /usr/bin/dpkg returned an error code (1)
web site I went to : https://itsfoss.com/dpkg-returned-an-error-code-1/
it tells me there are a few ways to do a work around :
I tried them all but they all did not work.
On stackoverflow I saw this so I gave it a try: https://stackoverflow.com/questions/58961079/mysql-server-5-7-is-not-configured-yet
sudo apt purge mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server-5.7 mysql-server-core-5.7 mysql-server sudo apt update && sudo apt dist-upgrade && sudo apt autoremove && sudo apt -f install sudo apt install mysql-server
Still gives me the same error.
What steps should I take now.
is it because I installed XAMPP before SQL server???