无法在 Debian squeeze 上安装 postfix

无法在 Debian squeeze 上安装 postfix

我遇到了一个奇怪的问题:apt-get 或 aptitude 无法安装 postfix。每次我都会收到此错误:

# apt-get install postfix
Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
 postfix : Depends: libsasl2-2 but it is not going to be installed
E: Broken packages

# aptitude install postfix
The following NEW packages will be installed:
  postfix ssl-cert{a} 
0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,417 kB of archives. After unpacking 3,535 kB will be used.
The following packages have unmet dependencies:
  exim4-config: Conflicts: postfix but 2.7.1-1+squeeze1 is to be installed.
  libsasl2-2: Breaks: postfix (<= 2.8.3-1) but 2.7.1-1+squeeze1 is to be installed.
The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     postfix [Not Installed]                            



Accept this solution? [Y/n/q/?] y
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

/etc/apt/sources.list:

# deb http://ftp.de.debian.org/debian/ squeeze main

deb http://ftp.de.debian.org/debian/ squeeze main
deb-src http://ftp.de.debian.org/debian/ squeeze main

deb http://security.debian.org/ squeeze/updates main
deb-src http://security.debian.org/ squeeze/updates main

# squeeze-updates, previously known as 'volatile'
deb http://ftp.de.debian.org/debian/ squeeze-updates main
deb-src http://ftp.de.debian.org/debian/ squeeze-updates main



deb http://packages.dotdeb.org squeeze all
deb-src http://packages.dotdeb.org squeeze all


# MariaDB 10.0 repository list - created 2013-10-11 09:14 UTC
# http://mariadb.org/mariadb/repositories/
deb http://mirror.netcologne.de/mariadb/repo/10.0/debian squeeze main
deb-src http://mirror.netcologne.de/mariadb/repo/10.0/debian squeeze main

我尝试使用 --purge 删除 potfix 和 exim5,然后重新安装,但问题仍然存在。感谢您的提示。

答案1

在 Debian 上,大量软件包都需要 MTA。尝试清除 exim 或任何其他 MTA 将导致安装替代版本。替代方案的顺序是这样的,删除 exim 将导致安装替代版本的 exim 或另一个 MTA。这些要求、替代方​​案和冲突使得更改已安装的 MTA 有点棘手。因为简单地清除 MTA 并不容易,而且如果您真的尝试清除 MTA,您还必须安装几乎所有可以使用 MTA 的东西。

为了解决这个 MTA 异常,我的解决方案是安装 SSMTP。

SSMTP 包是一个轻量级、无守护进程的仅传出 MTA,它将满足 MTA 要求,并且不与其他 MTA 冲突。因此,您可以同时安装标准存储库中的所有其他 MTA 和 SSMTP。安装完成后,您可以清除 exim 或其他 MTA,并根据需要进行更改。SSMTP 将满足 MTA 要求,而不会导致 APT 执行令人困惑的操作以尝试确保您已安装 MTA。

相关内容