mysql - 删除maria db后无法安装mysql ubuntu
问题描述
我正在研究mysql数据库,不幸的是我安装了mariadb,当我想回到mysql时出现错误,我删除了mariadb并尝试使用这个命令安装mysql
sudo apt-get install mysql-server
但我有这个错误
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-server is already the newest version (5.7.22-0ubuntu0.16.04.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up mysql-server-5.7 (5.7.22-0ubuntu0.16.04.1) ...
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
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)
我无法重新安装mysql,我该怎么办,我寻找解决方案但没有结果
解决方案
尝试进行清除,然后重新安装。
sudo apt-get remove --purge mysql-\*
sudo apt-get install mysql-server mysql-client
推荐阅读
- vba - .如果从工作表启动,查找宏不起作用
- python - 如果另一个文件夹中的 .xls 同名,如何打开文件夹中的 .txt
- javascript - console.log 文件在哪里?
- python-3.x - 如何从 REST API 读取数据并使用 Python 将数据插入 MongoDB?
- airflow - 如何使用 Airflow 对 BigQuery 执行 S3?
- vba - 有什么方法可以将形状名称保留在新幻灯片中?
- c# - C#返回颜色变化
- scala - 当我们在连接列中有多个值时,如何在 Spark Scala 中应用连接
- foselasticabundle - FOSElasticaBundle:多对多关系
- javascript - 计数器严重递增(Javascript)