MariaDB - 依赖问题 - 未配置

Kin*_*oul 9 debian configuration mysql mariadb debian-installer

我尝试在 Debian Jessie 8.1 上安装 ISPConfig3,但它无法连接到 mySQL (mariaDB 10.1)。所以我 CTRL+C 来终止安装,我尝试手动登录到 mySQL,但我失败了。它在抱怨插座。所以我清除并删除了 mariaDB 和 mySQL:

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
service apache2 restart
apt-get update
Run Code Online (Sandbox Code Playgroud)

在 source.list 我有(添加最后两行)(nano /etc/apt/sources.list):

deb http://debian.mirror.constant.com/ jessie main contrib non-free
deb-src http://debian.mirror.constant.com/ jessie main contrib non-free

deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free

deb [arch=amd64,i386] http://ftp.utexas.edu/mariadb/repo/10.0/debian jessie main
deb-src http://ftp.utexas.edu/mariadb/repo/10.0/debian jessie main
Run Code Online (Sandbox Code Playgroud)

然后我按照MariaDB给出的命令进行操作:

sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
sudo apt-get update
sudo apt-get install mariadb-server
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

Setting up mariadb-server-10.1 (10.1.9+maria-1~jessie) ...
2015-12-15 11:26:57 140472422967232 [Note] /usr/sbin/mysqld (mysqld 10.1.9-MariaDB-1~jessie) starting as process 12018 ...
2015-12-15 11:26:57 140472422967232 [Note] Using unique option prefix 'myisam_recover' is error-prone and can break in the future. Please use the full name 'myisam-recover-options' instead.
2015-12-15 11:26:57 140472422967232 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2015-12-15 11:26:57 140472422967232 [Note] InnoDB: The InnoDB memory heap is disabled
2015-12-15 11:26:57 140472422967232 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-12-15 11:26:57 140472422967232 [Note] InnoDB: Memory barrier is not used
2015-12-15 11:26:57 140472422967232 [Note] InnoDB: Compressed tables use zlib 1.2.8
2015-12-15 11:26:57 140472422967232 [Note] InnoDB: Using Linux native AIO
2015-12-15 11:26:57 140472422967232 [Note] InnoDB: Using CPU crc32 instructions
2015-12-15 11:26:57 140472422967232 [Note] InnoDB: Initializing buffer pool, size = 256.0M
2015-12-15 11:26:57 140472422967232 [Note] InnoDB: Completed initialization of buffer pool
2015-12-15 11:26:57 140472422967232 [Note] InnoDB: Highest supported file format is Barracuda.
2015-12-15 11:26:57 140472422967232 [Note] InnoDB: 128 rollback segment(s) are active.
2015-12-15 11:26:57 140472422967232 [Note] InnoDB: Waiting for purge to start
2015-12-15 11:26:57 140472422967232 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.26-74.0 started; log sequence number 19615081045
2015-12-15 11:26:57 140471636559616 [Note] InnoDB: Dumping buffer pool(s) not yet started
2015-12-15 11:26:58 140472422967232 [Note] Plugin 'FEEDBACK' is disabled.
Job for mariadb.service failed. See 'systemctl status mariadb.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mariadb-server-10.1 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mariadb-server:
 mariadb-server depends on mariadb-server-10.1 (= 10.1.9+maria-1~jessie); however:
  Package mariadb-server-10.1 is not configured yet.

dpkg: error processing package mariadb-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mariadb-server-10.1
 mariadb-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)

我该如何解决?

小智 15

请尝试以下操作:

apt-get remove --purge mysql*
apt-get remove --purge mysql
apt-get remove --purge mariadb
apt-get remove --purge mariadb*
apt-get --purge remove mariadb-server
apt-get --purge remove python-software-properties
Run Code Online (Sandbox Code Playgroud)

注意:当系统提示您是否要转储当前数据库时,请拒绝。但是您可以轻松地取消配置 phpmyadmin 数据库。

从新安装所有内容:将以下内容添加到您的/etc/apt/sources.list文件中:

deb [arch=amd64,i386] http://ftp.utexas.edu/mariadb/repo/10.1/debian jessie main
deb-src http://ftp.utexas.edu/mariadb/repo/10.1/debian jessie main
Run Code Online (Sandbox Code Playgroud)

然后,

apt-get install python-software-properties
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
apt-get install software-properties-common
apt-get install mariadb-server mariadb-client
Run Code Online (Sandbox Code Playgroud)

完成后,您应该能够运行mysql -V并看到以下内容:

mysql  Ver 15.1 Distrib 10.1.9-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
Run Code Online (Sandbox Code Playgroud)