无法在ubuntu 16.04上安装MySQL5.7

epfja78i  于 2021-06-21  发布在  Mysql
关注(0)|答案(0)|浏览(306)

在我的Ubuntu16.04 digital ocean droplet(安装了lamp堆栈)上运行更新和安装之后,我无法让mysql安装。。。我在这里试过很多帖子,但似乎都不管用,结果对我来说总是一样的:

Setting up mysql-server-5.7 (5.7.22-0ubuntu0.16.04.1) ...
update-alternatives: error: alternative link /etc/mysql/my.cnf is already managed by my.cnf.bak
dpkg: error processing package mysql-server-5.7 (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.7; however:
  Package mysql-server-5.7 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-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

我怀疑是“updatealternatives”行导致了这个问题,但我在系统上没有my.cnf.bak。我不是一个服务生,所以任何帮助都是了不起的!
尝试通过智能安装时的结果:

The following partially installed packages will be configured:
  mysql-server mysql-server-5.7
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Setting up mysql-server-5.7 (5.7.22-0ubuntu0.16.04.1) ...
update-alternatives: error: alternative link /etc/mysql/my.cnf is already managed by my.cnf.bak
dpkg: error processing package mysql-server-5.7 (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.7; however:
  Package mysql-server-5.7 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-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to perform requested operation on package.  Trying to recover:
Setting up mysql-server-5.7 (5.7.22-0ubuntu0.16.04.1) ...
update-alternatives: error: alternative link /etc/mysql/my.cnf is already managed by my.cnf.bak
dpkg: error processing package mysql-server-5.7 (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.7; however:
  Package mysql-server-5.7 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mysql-server-5.7
 mysql-server

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题