我有这个奇怪的问题: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
我试图 – 删除potfix和exim5,并重新安装,但问题仍然存在。 欣赏你的提示。
在Debian上有一个MTA需要大量的包。 试图清除exim,或任何其他MTAs将导致安装替代。 替代的顺序是这样的,删除exim将导致安装另一个版本的exim或另一个MTA。 这些要求,替代方法和冲突使得更改已安装的MTA有点棘手。 由于简单地清除MTA并不容易,如果你真的试图清除你的MTA,你将不得不安装几乎所有可以使用MTA的东西。
为了解决这个MTA怪异问题,我的解决scheme是安装SSMTP。
SSMTP包是一个轻量级的无后台程序,仅向外发送MTA,将满足MTA要求,并且不会与其他MTA发生冲突 。 所以你可以在标准仓库中同时安装SSMTP。 安装完成后,您可以清除exim或其他MTA,并根据自己的喜好进行更改。 SSMTP将填补MTA的要求,而不会导致APT做混淆的事情来尝试,并确保你有一个MTA安装。