When I try to install mysql-server, an error comes like:
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mysql-server-5.7
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
What does it mean. Any ideas?
My answer from askubuntu.
None of the
apt
methods worked for me, try this:Find locking process
Kill it
do
sudo kill -9 7973
, basically themysql
one.Now purge
If you are working on Debian 10, you need to first install GNUPG:
That's all; now you can try
dpkg
again.To solve the dependency issue, try:
And reinstall the package again by:
sudo apt-get install mysql-server
.Source: Thread: Dpkg: Dependency problems - leaving unconfigured.
Other commands to try:
Related: How can I Resolve dpkg dependency? at Ask Ubuntu.
I was in the same situation. After completely removing MySQL, I reinstalled it, killed the PID using port 3306, and reinstalled MySQL again. It's working now.
I had a similar issue. This is how I fixed mine.
sudo service mysql restart
sudo apt install -f
If you're on a VPS or similar, your error may be due to lack of RAM.
Running apt-upgrade seems to require some RAM, so it may force-close mysql, hence the problem to recover from the error.
Try:
1) Stop mysql manually before any apt-upgrade
2) Fix:
(if version not known, use just mysql-server to find out (will not fix error)
3) Check:
Start mysql manually if it wasn't started by apt.