dpkg: error processing package mysql-server

后端 未结 13 911
悲&欢浪女
悲&欢浪女 2020-12-31 04:44

When I try to install mysql-server, an error comes like:

dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigure         


        
相关标签:
13条回答
  • 2020-12-31 05:24

    I tried almost every possible way but nothing was working for me. Then I found the problem that I was facing was due to less available ram. You can check your current ram status by free -h (in my case available was less than 1 GB). To clear ram restart your device. Then type following commands

    sudo apt-get purge mysql*
    sudo apt-get autoremove
    sudo apt-get autoclean
    sudo apt-get dist-upgrade
    

    then again install mysql-server by

    sudo apt-get install mysql-server
    
    0 讨论(0)
  • 2020-12-31 05:28

    The problem can be much simpler (in my case) I had a missconfigured value in my configuration file [my.cnf] which lead to the error. After cleaning up my.cnf mysql-server was restarted successfully

    0 讨论(0)
  • 2020-12-31 05:29

    If you are working on Debian 10, you need to first install GNUPG:

    sudo apt-get install gnupg
    

    That's all; now you can try dpkg again.

    0 讨论(0)
  • 2020-12-31 05:30

    I had a similar issue. This is how I fixed mine.

    1. Restart MySQL service sudo service mysql restart
    2. Then fix broken installations sudo apt install -f
    0 讨论(0)
  • 2020-12-31 05:38

    try this solution using aptitude this will replace all the file corrupted.

    This is work on my 18.04

    cr. https://www.digitalocean.com/community/questions/mysql-installation-error-dpkg-error-processing-package-mysql-server-5-5-configure?answer=61604

    0 讨论(0)
  • 2020-12-31 05:39

    My answer from askubuntu.

    None of the apt methods worked for me, try this:

    Find locking process

    $ ps -eaf
    root      7316     1  0 00:19 ?        00:00:00 /usr/bin/dpkg --status-fd 35 --configure --pending
    root      7808  7316  0 00:19 ?        00:00:00 /usr/bin/perl -w /usr/share/debconf/frontend /var/lib/dpkg/info/mysql-se
    root      7817  7808  0 00:19 ?        00:00:00 /bin/bash /var/lib/dpkg/info/mysql-server-5.7.postinst configure
    mysql     7973  7817  0 00:20 ?        00:00:00 mysqld --user=mysql --init-file=/var/lib/mysql-files/tmp.iNyY06ty0K --so
    

    Kill it

    do sudo kill -9 7973, basically the mysql one.

    Now purge

    sudo apt-get purge mysql-server-5.7 # Or whatever you are trying to purge.
    
    0 讨论(0)
提交回复
热议问题