【问题标题】:Problems installing MySQL on Ubuntu 20.04在 Ubuntu 20.04 上安装 MySQL 的问题
【发布时间】:2021-08-06 09:25:04
【问题描述】:

我正在尝试使用 sudo apt install mysql-server 在 Ubuntu 20.04 中安装 MySQL 8.0,但在重新安装和使用 sudo dpkg --configure -a 后,此错误仍然出现:

Setting up mysql-server-8.0 (8.0.25-0ubuntu0.20.04.1) ...
/var/lib/dpkg/info/mysql-server-8.0.postinst: line 191: /usr/share/mysql-common/
configure-symlinks: No such file or directory
dpkg: error processing package mysql-server-8.0 (--configure):
 installed mysql-server-8.0 package post-installation script subprocess returned
 error exit status 127
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-8.0; however:
  Package mysql-server-8.0 is not configured yet.

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

我完全卸载了 MySQL 并使用sudo apt remove --purge --autoremove mysql-server 重新安装了多次,但错误仍然存​​在。

【问题讨论】:

    标签: mysql


    【解决方案1】:

    我遇到了同样的问题,发现很好 article 解决它..

    确实不建议直接从 MySQL 文件夹中删除文件。您可以在此处查看本指南,了解如何删除旧的 MySQL 二进制文件 here

    关于您当前的问题。为了完全摆脱您的 MySQL 安装,您可以运行以下命令:

    • 确保 MySQL 没有运行:
    sudo systemctl stop mysql
    
    • 然后清除所有 MySQL 包:
    sudo apt purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-*
    
    • 然后删除所有 MySQL 文件:
    sudo rm -rf /etc/mysql /var/lib/mysql /var/log/mysql
    
    • 最后清理所有不需要的包:
    • 列表项
    sudo apt autoremove
    sudo apt autoclean
    

    希望这会有所帮助! 问候,

    【讨论】:

      猜你喜欢
      • 2021-02-24
      • 2020-10-04
      • 1970-01-01
      • 2022-01-03
      • 2020-09-01
      • 2021-05-21
      • 2021-07-03
      • 2021-08-23
      • 1970-01-01
      相关资源
      最近更新 更多