MariaDB 安装时出错

MariaDB 安装时出错

每当我尝试安装 MariaDB 时都会出现以下信息:

$ sudo apt-get install mariadb-server
...
Fetched 12.1 MB in 3s (3,278 kB/s)
Preconfiguring packages ...
dpkg: mysql-server: dependency problems, but removing anyway as you requested:
 ajenti-v-mysql depends on mysql-server | mariadb-server; however:
  Package mysql-server is to be removed.
  Package mariadb-server is not installed.

(Reading database ... 99303 files and directories currently installed.)
Removing mysql-server (5.5.44-0ubuntu0.14.04.1) ...
Removing mysql-server-5.5 (5.5.44-0ubuntu0.14.04.1) ...
mysql stop/waiting
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Selecting previously unselected package mariadb-server-10.0.
(Reading database ... 99227 files and directories currently installed.)
Preparing to unpack .../mariadb-server-10.0_10.0.21+maria-1~trusty_amd64.deb ...
Unpacking mariadb-server-10.0 (10.0.21+maria-1~trusty) ...
dpkg: error processing archive /var/cache/apt/archives/mariadb-server-10.0_10.0.21+maria-1~trusty_amd64.deb (--unpack)
 trying to overwrite '/usr/share/mysql/mysql_system_tables.sql', which is also in package mysql-server-core-5.5 5.5.440ubuntu0.14.04.1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/mariadb-server-10.0_10.0.21+maria-1~trusty_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

当我尝试寻找这个问题的解决方案时,我通常会找到一些与libmysqlclient18但我不认为这与这个问题有任何关系。至少解决方案在这里不起作用。

目前服务器位于带有 Ubuntu 14.04 和 Ajenti 控制面板(nginx、php-fpm、mysql 5.5)的 VPS 上。

答案1

$ sudo dpkg -i --force-overwrite /var/cache/apt/archives/mariadb-server-10.0_10.0.21+maria-1~trusty_amd64.deb
$ sudo apt-get -f install

这些解决了它。

相关内容