isntall/remove 后 MariaDB 依赖关系问题

isntall/remove 后 MariaDB 依赖关系问题

我尝试通过完全删除 MySQL 来将 MySQL 5.5“升级”到 MariaDB。然后我安装了MariaDB 10.1,如下:

sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
sudo add-apt-repository 'deb [arch=amd64,i386] http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.1/debian jessie main'
sudo apt-get update
sudo apt-get install mariadb-server
service apache2 restart

但之后,phpMyAdmin 未加载,并返回 404。我使用的应用程序加载正常,并且我能够通过命令行连接到数据库。并mysql -V返回 mariadb 版本。

所以我删除了 phpMyAdmin 和 MariaDB,如下所示:

service mysql stop
apt-get --purge remove "mysql*"
mv /etc/mysql/ /tmp/mysql_configs/
apt-get remove --purge mysql*
apt-get autoremove
apt-get autoclean
apt-get purge phpmyadmin
apt-get autoremove phpmyadmin
service apache2 restart
apt-get update

清除源文件中的 mariadb 条目:/etc/apt/sources.list

现在,每次我尝试apt-get install任何操作都会返回一个错误:

apt-get install mysql-server mysql-client

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 mariadb-server-10.0 : Depends: mariadb-client-10.0 (>= 10.0.22-0+deb8u1) but it is not going to be installed
                       Depends: mariadb-server-core-10.0 (>= 10.0.22-0+deb8u1) but it is not going to be installed
                       PreDepends: mariadb-common but it is not going to be installed
                       Breaks: mysql-server
 mysql-client : Depends: mysql-client-5.5
 mysql-server : Depends: mysql-server-5.5 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

此错误适用于我尝试安装的任何内容。我确实尝试过apt-get -f install。有什么想法我搞砸了以及如何解决它吗?

笔记:

lsb_release -da
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 8.2 (jessie)
Release:        8.2
Codename:       jessie

apache2 -v
Server version: Apache/2.4.10 (Debian)
Server built:   Aug 28 2015 16:28:08

相关内容