apt-get 替代 MySQL 的 MariaDB

apt-get 替代 MySQL 的 MariaDB

我正在尝试postfixadmin在 Ubuntu 上安装。我已安装 MariaDB 并希望将其用作我的 MySQL 数据库。但是,postfixadmin 的软件包依赖项是 MySQL,而不是 MariaDB。有什么方法可以告诉 apt 忽略对 MySQL 的需求(并在任何升级时永久记住这一点)并改用 MariaDB?还是我会陷入困境并需要构建 postfixadmin?

编辑:这就是 apt 想要做的......

sudo apt-get install -s postfixadmin 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  apache2 apache2-bin apache2-data apache2-utils dbconfig-common dovecot-core libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap
  libexttextcat-2.0-0 libexttextcat-data liblockfile-bin liblockfile1 liblua5.1-0 lockfile-progs mysql-client mysql-client-5.6 mysql-client-core-5.6 mysql-server
  mysql-server-5.6 mysql-server-core-5.6 ntpdate php5-mysql postfix-mysql wwwconfig-common
Suggested packages:
  apache2-doc apache2-suexec-pristine | apache2-suexec-custom dbconfig-mysql | dbconfig-pgsql | dbconfig-sqlite | dbconfig-sqlite3 | dbconfig-no-thanks dovecot-gssapi
  dovecot-sieve dovecot-pgsql dovecot-mysql dovecot-sqlite dovecot-ldap dovecot-imapd dovecot-pop3d dovecot-lmtpd dovecot-managesieved dovecot-solr dovecot-lucene mailx tinyca
  postgresql-client
Recommended packages:
  zendframework
The following packages will be REMOVED
  mariadb-client mariadb-client-10.0 mariadb-client-core-10.0 mariadb-server mariadb-server-10.0 mariadb-server-core-10.0
The following NEW packages will be installed
  apache2 apache2-bin apache2-data apache2-utils dbconfig-common dovecot-core libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap
  libexttextcat-2.0-0 libexttextcat-data liblockfile-bin liblockfile1 liblua5.1-0 lockfile-progs mysql-client mysql-client-5.6 mysql-client-core-5.6 mysql-server
  mysql-server-5.6 mysql-server-core-5.6 ntpdate php5-mysql postfix-mysql postfixadmin wwwconfig-common
0 to upgrade, 28 to newly install, 6 to remove and 50 not to upgrade.

答案1

postfixadmin 应该可以与 MariaDB 配合使用。它是一个简易替代品。在 $CONF[database_type] 中,您需要配置“mysql”或“mysqli”,而不是“mariadb”。

如果 postfixadmin 继续尝试安装 MySql,您可以尝试--nodeps使用标志或使用选项apt-get下载并安装包dpkg--ignore-depends

祝你好运!

相关内容