在debian jessie上安装maridb

时间:2016-01-08 22:25:45

标签: installation debian mariadb

我想在Debian 8 Jessie上安装mariaDB 10,但在安装时出现了一些错误。

[ ok ] Stopping MariaDB database server: mysqld.
dpkg: error processing package mariadb-server-10.0 (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up libdbd-mysql-perl (4.028-2+b1) ...
dpkg: dependency problems prevent configuration of mariadb-server:
 mariadb-server depends on mariadb-server-10.0 (>= 10.0.22-0+deb8u1); however:
  Package mariadb-server-10.0 is not configured yet.

dpkg: error processing package mariadb-server (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.19-18+deb8u1) ...
Errors were encountered while processing:
 mariadb-server-10.0
 mariadb-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

使用设置指南https://downloads.mariadb.org/mariadb/repositories/#mirror=host-europe,mariadb 10.1发生了相同的错误。

我做错了什么?

更新: 在apt-get install mariadb *之后

Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'mariadb-client-5.1' for regex 'mariadb*'
Note, selecting 'mariadb-client-5.2' for regex 'mariadb*'
Note, selecting 'mariadb-client-5.3' for regex 'mariadb*'
Note, selecting 'mariadb-client-5.5' for regex 'mariadb*'
Note, selecting 'mariadb-oqgraph-engine-10.0' for regex 'mariadb*'
Note, selecting 'mariadb-oqgraph-engine-10.1' for regex 'mariadb*'
Note, selecting 'mariadb-cracklib-password-check-10.1' for regex 'mariadb*'
Note, selecting 'libmariadb-client-lgpl-dev' for regex 'mariadb*'
Note, selecting 'mariadb-galera-server' for regex 'mariadb*'
Note, selecting 'mariadb-client' for regex 'mariadb*'
Note, selecting 'libmariadbclient16' for regex 'mariadb*'
Note, selecting 'libmariadbclient18' for regex 'mariadb*'
Note, selecting 'libmariadb2' for regex 'mariadb*'
Note, selecting 'mariadb-tokudb-engine-10.0' for regex 'mariadb*'
Note, selecting 'mariadb-test' for regex 'mariadb*'
Note, selecting 'mariadb-test-5.1' for regex 'mariadb*'
Note, selecting 'mariadb-test-5.2' for regex 'mariadb*'
Note, selecting 'mariadb-test-5.3' for regex 'mariadb*'
Note, selecting 'mariadb-test-5.5' for regex 'mariadb*'
Note, selecting 'mariadb-client-core-10.0' for regex 'mariadb*'
Note, selecting 'mariadb-client-core-10.1' for regex 'mariadb*'
Note, selecting 'libmariadbclient-dev' for regex 'mariadb*'
Note, selecting 'mariadb-server-core-10.0' for regex 'mariadb*'
Note, selecting 'mariadb-server-core-10.1' for regex 'mariadb*'
Note, selecting 'mariadb-client-core-5.1' for regex 'mariadb*'
Note, selecting 'mariadb-client-core-5.2' for regex 'mariadb*'
Note, selecting 'mariadb-client-core-5.3' for regex 'mariadb*'
Note, selecting 'mariadb-client-core-5.5' for regex 'mariadb*'
Note, selecting 'libmariadb-client-lgpl-dev-compat' for regex 'mariadb*'
Note, selecting 'mariadb-galera-server-5.5' for regex 'mariadb*'
Note, selecting 'mariadb-server-5.1' for regex 'mariadb*'
Note, selecting 'mariadb-server-5.2' for regex 'mariadb*'
Note, selecting 'mariadb-server-5.3' for regex 'mariadb*'
Note, selecting 'mariadb-server-5.5' for regex 'mariadb*'
Note, selecting 'mariadb-common' for regex 'mariadb*'
Note, selecting 'mariadb-galera-server-10.0' for regex 'mariadb*'
Note, selecting 'libmariadbd-dev' for regex 'mariadb*'
Note, selecting 'mariadb-test-10.0' for regex 'mariadb*'
Note, selecting 'mariadb-test-10.1' for regex 'mariadb*'
Note, selecting 'mariadb-client-10.0' for regex 'mariadb*'
Note, selecting 'mariadb-client-10.1' for regex 'mariadb*'
Note, selecting 'mariadb-server-10.0' for regex 'mariadb*'
Note, selecting 'mariadb-server-10.1' for regex 'mariadb*'
Note, selecting 'mariadb-server-core-5.1' for regex 'mariadb*'
Note, selecting 'mariadb-server-core-5.2' for regex 'mariadb*'
Note, selecting 'mariadb-server-core-5.3' for regex 'mariadb*'
Note, selecting 'mariadb-server-core-5.5' for regex 'mariadb*'
Note, selecting 'mariadb-server' for regex 'mariadb*'
Note, selecting 'libmariadbclient16-dev' for regex 'mariadb*'
Note, selecting 'mariadb-connect-engine-10.0' for regex 'mariadb*'
Note, selecting 'mariadb-tokudb-engine-5.5' for regex 'mariadb*'
Note, selecting 'mariadb-connect-engine-10.1' for regex 'mariadb*'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libmariadb-client-lgpl-dev-compat : Conflicts: libmysqlclient-dev
 mariadb-client-10.0 : Conflicts: mysql-client-core-5.5
                       Conflicts: mysql-client-core-5.6
                       Breaks: mysql-client
                       Breaks: mysql-client-5.5
                       Breaks: mysql-client-5.6
                       Breaks: virtual-mysql-client
 mariadb-client-10.1 : Conflicts: mariadb-client-10.0 but 10.0.22-0+deb8u1 is to be installed
                       Conflicts: virtual-mysql-client
 mariadb-client-core-10.0 : Conflicts: mysql-client-5.5
                            Conflicts: mysql-client-5.6
                            Breaks: mysql-client-core-5.5
                            Breaks: mysql-client-core-5.6
                            Breaks: virtual-mysql-client-core
 mariadb-client-core-10.1 : Conflicts: mariadb-client-10.0 but 10.0.22-0+deb8u1 is to be installed
                            Conflicts: mariadb-client-core-10.0 but 10.0.22-0+deb8u1 is to be installed
                            Conflicts: virtual-mysql-client-core
 mariadb-server-10.0 : Conflicts: mysql-server-core-5.5
                       Conflicts: mysql-server-core-5.6
                       Breaks: mysql-client-5.5
                       Breaks: mysql-server
                       Breaks: virtual-mysql-server
 mariadb-server-10.1 : Conflicts: mariadb-server-10.0 but 10.0.22-0+deb8u1 is to be installed
                       Conflicts: virtual-mysql-server
 mariadb-server-core-10.0 : Breaks: mysql-client-5.5
                            Breaks: mysql-client-5.6
                            Breaks: mysql-server-core-5.5
                            Breaks: mysql-server-core-5.6
                            Breaks: virtual-mysql-server-core
 mariadb-server-core-10.1 : Conflicts: mariadb-server-core-10.0 but 10.0.22-0+deb8u1 is to be installed
                            Conflicts: virtual-mysql-server-core
 mariadb-test-10.0 : Breaks: virtual-mysql-testsuite
 mariadb-test-10.1 : Conflicts: mariadb-test-10.0 but 10.0.22-0+deb8u1 is to be installed
                     Conflicts: virtual-mysql-testsuite
E: Unable to correct problems, you have held broken packages.

1 个答案:

答案 0 :(得分:0)

看起来你只有512 MB的RAM,为了安装mariaDB,这个过程需要分配更多的内存:

Setting up mariadb-server-5.5 (5.5.47+maria-1~wheezy) ...
[ ok ] Stopping MariaDB database server: mysqld.
160115 13:57:36 [Note] /usr/sbin/mysqld (mysqld 5.5.47-MariaDB-1~wheezy-log) starting as process 4208 ...
160115 13:57:36 [Note] Plugin 'InnoDB' is disabled.
160115 13:57:36 [ERROR] mysqld: Out of memory (Needed 128917504 bytes)
160115 13:57:36 [ERROR] mysqld: Out of memory (Needed 96681984 bytes)

160115 13:57:36 [ERROR] mysqld: Aria recovery failed. Please run aria_chk -r on all Aria tables and delete all aria_log.######## files
160115 13:57:36 [ERROR] Plugin 'Aria' init function returned error.
160115 13:57:36 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
160115 13:57:36 [Note] Plugin 'FEEDBACK' is disabled.
ERROR: 1041  Out of memory; check if mysqld or some other process uses all available memory; 
if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space

您可以向VM添加更多内存或创建交换文件。我删除了每一个 在你的机器上追踪mariadb,所以,当你满足要求时 你只需输入以下命令即可安装:

apt-get install mariadb-server