Mysql没有正确卸载或安装

时间:2018-06-12 14:08:53

标签: mysql ubuntu-16.04

由于一些复杂性,我决定在Ubuntu服务器上重新安装MySQL,这发生在任何人都知道该怎么办?

root@PHost1:~# sudo apt-get remove --purge mysql-server mysql-client mysql-common
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Package 'mysql-client' is not installed, so not removed
    Package 'mysql-common' is not installed, so not removed
    Package 'mysql-server' is not installed, so not removed
    You might want to run 'apt-get -f install' to correct these:
    The following packages have unmet dependencies:
     mysql-server-5.7 : PreDepends: mysql-common (>= 5.5) but it is not going to be installed
                        Depends: mysql-client-5.7 (>= 5.7.22-0ubuntu0.16.04.1) but it is not going to be installed
                        Depends: mysql-common (>= 5.6.22-1~) but it is not going to be installed
                        Depends: mysql-server-core-5.7 (= 5.7.22-0ubuntu0.16.04.1) but it is not going to be installed
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
    root@PHost1:~# apt-get -f install
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Correcting dependencies... Done
    The following additional packages will be installed:
      mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server-core-5.7
    The following NEW packages will be installed:
      mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server-core-5.7
    0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
    1 not fully installed or removed.
    Need to get 0 B/15.4 MB of archives.
    After this operation, 112 MB of additional disk space will be used.
    Do you want to continue? [Y/n] Y
    Selecting previously unselected package mysql-common.
    (Reading database ... 121504 files and directories currently installed.)
    Preparing to unpack .../mysql-common_5.7.22-0ubuntu0.16.04.1_all.deb ...
    Unpacking mysql-common (5.7.22-0ubuntu0.16.04.1) ...
    Selecting previously unselected package mysql-client-core-5.7.
    Preparing to unpack .../mysql-client-core-5.7_5.7.22-0ubuntu0.16.04.1_amd64.deb ...
    Unpacking mysql-client-core-5.7 (5.7.22-0ubuntu0.16.04.1) ...
    Selecting previously unselected package mysql-client-5.7.
    Preparing to unpack .../mysql-client-5.7_5.7.22-0ubuntu0.16.04.1_amd64.deb ...
    Unpacking mysql-client-5.7 (5.7.22-0ubuntu0.16.04.1) ...
    Selecting previously unselected package mysql-server-core-5.7.
    Preparing to unpack .../mysql-server-core-5.7_5.7.22-0ubuntu0.16.04.1_amd64.deb ...
    Unpacking mysql-server-core-5.7 (5.7.22-0ubuntu0.16.04.1) ...
    Processing triggers for man-db (2.7.5-1) ...
    Setting up mysql-common (5.7.22-0ubuntu0.16.04.1) ...
    update-alternatives: warning: alternative /etc/mysql/mysql.cnf (part of link group my.cnf) doesn't exist; removing from list of alternatives
    update-alternatives: warning: /etc/alternatives/my.cnf is dangling; it will be updated with best choice
    update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
    Setting up mysql-client-core-5.7 (5.7.22-0ubuntu0.16.04.1) ...
    Setting up mysql-client-5.7 (5.7.22-0ubuntu0.16.04.1) ...
    Setting up mysql-server-core-5.7 (5.7.22-0ubuntu0.16.04.1) ...
    Setting up mysql-server-5.7 (5.7.22-0ubuntu0.16.04.1) ...
    invoke-rc.d: dangling symlink: /etc/rc5.d/S03mysql
    update-alternatives: error: alternative path /etc/mysql/mysql.cnf doesn't exist
    dpkg: error processing package mysql-server-5.7 (--configure):
     subprocess installed post-installation script returned error exit status 2
    Errors were encountered while processing:
     mysql-server-5.7
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    root@PHost1:~#

如果您需要从我准备提供的任何地方获取更多数据

我引用了以下链接来进行卸载,但我被困在这里。 ubuntu-Removing MYSQL

askUbuntu Help Group

提前致谢。

我在以下链接找到了这个问题的答案

dangling symlink error solved

0 个答案:

没有答案