Mysql 8 无法在 ubuntu 20.04 中重新安装

Mysql 8 无法在 ubuntu 20.04 中重新安装

我尝试使用以下步骤多次安装 mysql,但都出现同样的错误

尝试的步骤:

sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-*
sudo rm -rf /etc/mysql /var/lib/mysql
sudo apt-get autoremove
sudo apt install mysql-server

Error 
Setting up mysql-server-8.0 (8.0.21-0ubuntu0.20.04.4) ...
Warning: The unit file, source configuration file or drop-ins of mysql.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Renaming removed key_buffer and myisam-recover options (if present)
ERROR: Unable to start MySQL server:
mysqld: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory
Please take a look at https://wiki.debian.org/Teams/MySQL/FAQ for tips on fixing common upgrade issues.
Once the problem is resolved, run apt-get --fix-broken install to retry.
dpkg: error processing package mysql-server-8.0 (--configure):
 installed mysql-server-8.0 package post-installation script subprocess returned error exit status 127
dpkg: 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 unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                    Errors were encountered while processing:
 mysql-server-8.0
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

输出systemctl status mysql.service

Warning: The unit file, source configuration file or drop-ins of mysql.service changed on disk. Run 'systemctl daemon-reload' to reload units.
● mysql.service
     Loaded: masked (Reason: Unit mysql.service is masked.)
    Drop-In: /etc/systemd/system/mysql.service.d
             └─override.conf
     Active: failed (Result: exit-code) since Wed 2020-08-05 21:08:57 IST; 39min ago

Aug 05 21:08:56 sumit-Lenovo-Z50-70 systemd[1]: mysql.service: Control process exited, code=exited, status=1/FAILURE
Aug 05 21:08:56 sumit-Lenovo-Z50-70 systemd[1]: mysql.service: Failed with result 'exit-code'.
Aug 05 21:08:56 sumit-Lenovo-Z50-70 systemd[1]: Failed to start MySQL Community Server.
Aug 05 21:08:57 sumit-Lenovo-Z50-70 systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
Aug 05 21:08:57 sumit-Lenovo-Z50-70 systemd[1]: Stopped MySQL Community Server.
Aug 05 21:08:57 sumit-Lenovo-Z50-70 systemd[1]: mysql.service: Start request repeated too quickly.
Aug 05 21:08:57 sumit-Lenovo-Z50-70 systemd[1]: mysql.service: Failed with result 'exit-code'.
Aug 05 21:08:57 sumit-Lenovo-Z50-70 systemd[1]: Failed to start MySQL Community Server.

相关内容