我无法执行,因为我的版本apt-get upgrade
有错误。postfix
postfix
如果我尝试仅安装该软件包,但我不明白如何解决此问题,则会收到以下错误?
root@srv-ispconfig:~# apt-get install postfix
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
fontconfig-config fonts-droid fonts-liberation gsfonts hicolor-icon-theme imagemagick-common libcupsimage2 libdatrie1 libdjvulibre-text libdjvulibre21 libexiv2-12 libfuse2 libgs9-common
libijs-0.35 libilmbase6 libjasper1 libjbig0 libjbig2dec0 liblcms1 liblcms2-2 liblensfun-data liblensfun0 liblqr-1-0 libnetpbm10 libopenexr6 libpaper-utils libpaper1 libpixman-1-0 libthai-data
libthai0 libtiff4 libxcb-render0 libxcb-shm0 libxrender1 netpbm poppler-data ufraw-batch
Veuillez utiliser « apt-get autoremove » pour les supprimer.
Paquets suggérés :
postfix-mysql postfix-pgsql postfix-ldap postfix-pcre postfix-lmdb postfix-sqlite sasl2-bin resolvconf postfix-cdb ufw
Les paquets suivants seront mis à jour :
postfix
1 mis à jour, 0 nouvellement installés, 0 à enlever et 168 non mis à jour.
2 partiellement installés ou enlevés.
Il est nécessaire de prendre 0 o/1 448 ko dans les archives.
Après cette opération, 471 ko d'espace disque supplémentaires seront utilisés.
Lecture des fichiers de modifications (« changelog »)... Terminé
Préconfiguration des paquets...
postconf: invalid option -- 'x'
postconf: fatal: usage: postconf [-a (server SASL types)] [-A (client SASL types)] [-b (bounce templates)] [-c config_dir] [-C param_class] [-d (defaults)] [-e (edit)] [-f (fold lines)] [-# (comment-out)] [-h (no names)] [-l (lock types)] [-m (map types)] [-M (master.cf)] [-n (non-defaults)] [-v] [name...]
Use of uninitialized value $destinations in scalar chomp at /tmp/postfix.config.418131 line 221.
Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/Client/ConfModule.pm line 121.
postconf: invalid option -- 'x'
postconf: fatal: usage: postconf [-a (server SASL types)] [-A (client SASL types)] [-b (bounce templates)] [-c config_dir] [-C param_class] [-d (defaults)] [-e (edit)] [-f (fold lines)] [-# (comment-out)] [-h (no names)] [-l (lock types)] [-m (map types)] [-M (master.cf)] [-n (non-defaults)] [-v] [name...]
Use of uninitialized value $mynetworks in scalar chomp at /tmp/postfix.config.418131 line 285.
Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/Client/ConfModule.pm line 121.
postconf: invalid option -- 'x'
postconf: fatal: usage: postconf [-a (server SASL types)] [-A (client SASL types)] [-b (bounce templates)] [-c config_dir] [-C param_class] [-d (defaults)] [-e (edit)] [-f (fold lines)] [-# (comment-out)] [-h (no names)] [-l (lock types)] [-m (map types)] [-M (master.cf)] [-n (non-defaults)] [-v] [name...]
Use of uninitialized value $protos in scalar chomp at /tmp/postfix.config.418131 line 387.
Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/Client/ConfModule.pm line 121.
dpkg: avertissement: le fichier contenant la liste des fichiers du paquet « postfix » étant manquant, il est considéré qu'aucun fichier du paquet n'est actuellement installé
(Lecture de la base de données... 69515 fichiers et répertoires déjà installés.)
Préparation du dépaquetage de .../postfix_3.2.2-1_amd64.deb ...
postconf: invalid option -- 'x'
postconf: fatal: usage: postconf [-a (server SASL types)] [-A (client SASL types)] [-b (bounce templates)] [-c config_dir] [-C param_class] [-d (defaults)] [-e (edit)] [-f (fold lines)] [-# (comment-out)] [-h (no names)] [-l (lock types)] [-m (map types)] [-M (master.cf)] [-n (non-defaults)] [-v] [name...]
Use of uninitialized value $destinations in scalar chomp at /var/lib/dpkg/tmp.ci/config line 221.
Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/Client/ConfModule.pm line 121.
postconf: invalid option -- 'x'
postconf: fatal: usage: postconf [-a (server SASL types)] [-A (client SASL types)] [-b (bounce templates)] [-c config_dir] [-C param_class] [-d (defaults)] [-e (edit)] [-f (fold lines)] [-# (comment-out)] [-h (no names)] [-l (lock types)] [-m (map types)] [-M (master.cf)] [-n (non-defaults)] [-v] [name...]
Use of uninitialized value $mynetworks in scalar chomp at /var/lib/dpkg/tmp.ci/config line 285.
Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/Client/ConfModule.pm line 121.
postconf: invalid option -- 'x'
postconf: fatal: usage: postconf [-a (server SASL types)] [-A (client SASL types)] [-b (bounce templates)] [-c config_dir] [-C param_class] [-d (defaults)] [-e (edit)] [-f (fold lines)] [-# (comment-out)] [-h (no names)] [-l (lock types)] [-m (map types)] [-M (master.cf)] [-n (non-defaults)] [-v] [name...]
Use of uninitialized value $protos in scalar chomp at /var/lib/dpkg/tmp.ci/config line 387.
Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/Client/ConfModule.pm line 121.
postconf: invalid option -- 'x'
postconf: fatal: usage: postconf [-a (server SASL types)] [-A (client SASL types)] [-b (bounce templates)] [-c config_dir] [-C param_class] [-d (defaults)] [-e (edit)] [-f (fold lines)] [-# (comment-out)] [-h (no names)] [-l (lock types)] [-m (map types)] [-M (master.cf)] [-n (non-defaults)] [-v] [name...]
postconf: invalid option -- 'x'
postconf: fatal: usage: postconf [-a (server SASL types)] [-A (client SASL types)] [-b (bounce templates)] [-c config_dir] [-C param_class] [-d (defaults)] [-e (edit)] [-f (fold lines)] [-# (comment-out)] [-h (no names)] [-l (lock types)] [-m (map types)] [-M (master.cf)] [-n (non-defaults)] [-v] [name...]
dpkg: erreur de traitement de l'archive /var/cache/apt/archives/postfix_3.2.2-1_amd64.deb (--unpack) :
le sous-processus nouveau script pre-installation a retourné une erreur de sortie d'état 1
Des erreurs ont été rencontrées pendant l'exécution :
/var/cache/apt/archives/postfix_3.2.2-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@srv-ispconfig:~#
我的服务器版本是:
Linux servername 3.2.0-4-amd64 #1 SMP Debian 3.2.89-1 x86_64 GNU/Linux with ISPconfig3
已安装且是最新的
我也尝试过以下操作:
clear apt-get
purge postfix install
- 检查 postfix 依赖关系并应用更新
但是,他们都不适合我。
并尝试过apt-get -f install
但没有成功。
root@msi-ispconfig:~# clear
root@srv-ispconfig:~# apt-get -f install
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Correction des dépendances... Fait
Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
fontconfig-config fonts-droid fonts-liberation gsfonts hicolor-icon-theme html2text imagemagick-common libcupsimage2 libdatrie1 libdjvulibre-text libdjvulibre21 libexiv2-12 libfuse2
libgs9-common libijs-0.35 libilmbase6 libjasper1 libjbig0 libjbig2dec0 liblcms1 liblcms2-2 liblensfun-data liblensfun0 liblqr-1-0 libnetpbm10 libopenexr6 libpaper-utils libpaper1
libpixman-1-0 libthai-data libthai0 libtiff4 libxcb-render0 libxcb-shm0 libxrender1 netpbm poppler-data ufraw-batch
Veuillez utiliser « apt-get autoremove » pour les supprimer.
Les paquets supplémentaires suivants seront installés :
postfix
Paquets suggérés :
postfix-pgsql postfix-ldap postfix-pcre postfix-lmdb postfix-sqlite sasl2-bin resolvconf postfix-cdb ufw
Les paquets suivants seront mis à jour :
postfix
1 mis à jour, 0 nouvellement installés, 0 à enlever et 167 non mis à jour.
1 partiellement installés ou enlevés.
Il est nécessaire de prendre 0 o/1 448 ko dans les archives.
Après cette opération, 471 ko d'espace disque supplémentaires seront utilisés.
Souhaitez-vous continuer [O/n] ? o
Lecture des fichiers de modifications (« changelog »)... Terminé
Préconfiguration des paquets...
postconf: invalid option -- 'x'
postconf: fatal: usage: postconf [-a (server SASL types)] [-A (client SASL types)] [-b (bounce templates)] [-c config_dir] [-C param_class] [-d (defaults)] [-e (edit)] [-f (fold lines)] [-# (comment-out)] [-h (no names)] [-l (lock types)] [-m (map types)] [-M (master.cf)] [-n (non-defaults)] [-v] [name...]
Use of uninitialized value $destinations in scalar chomp at /tmp/postfix.config.72701 line 221.
Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/Client/ConfModule.pm line 121.
postconf: invalid option -- 'x'
postconf: fatal: usage: postconf [-a (server SASL types)] [-A (client SASL types)] [-b (bounce templates)] [-c config_dir] [-C param_class] [-d (defaults)] [-e (edit)] [-f (fold lines)] [-# (comment-out)] [-h (no names)] [-l (lock types)] [-m (map types)] [-M (master.cf)] [-n (non-defaults)] [-v] [name...]
Use of uninitialized value $mynetworks in scalar chomp at /tmp/postfix.config.72701 line 285.
Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/Client/ConfModule.pm line 121.
postconf: invalid option -- 'x'
postconf: fatal: usage: postconf [-a (server SASL types)] [-A (client SASL types)] [-b (bounce templates)] [-c config_dir] [-C param_class] [-d (defaults)] [-e (edit)] [-f (fold lines)] [-# (comment-out)] [-h (no names)] [-l (lock types)] [-m (map types)] [-M (master.cf)] [-n (non-defaults)] [-v] [name...]
Use of uninitialized value $protos in scalar chomp at /tmp/postfix.config.72701 line 387.
Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/Client/ConfModule.pm line 121.
dpkg: avertissement: le fichier contenant la liste des fichiers du paquet « postfix » étant manquant, il est considéré qu'aucun fichier du paquet n'est actuellement installé
(Lecture de la base de données... 69877 fichiers et répertoires déjà installés.)
Préparation du dépaquetage de .../postfix_3.2.2-1_amd64.deb ...
postconf: invalid option -- 'x'
postconf: fatal: usage: postconf [-a (server SASL types)] [-A (client SASL types)] [-b (bounce templates)] [-c config_dir] [-C param_class] [-d (defaults)] [-e (edit)] [-f (fold lines)] [-# (comment-out)] [-h (no names)] [-l (lock types)] [-m (map types)] [-M (master.cf)] [-n (non-defaults)] [-v] [name...]
Use of uninitialized value $destinations in scalar chomp at /var/lib/dpkg/tmp.ci/config line 221.
Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/Client/ConfModule.pm line 121.
postconf: invalid option -- 'x'
postconf: fatal: usage: postconf [-a (server SASL types)] [-A (client SASL types)] [-b (bounce templates)] [-c config_dir] [-C param_class] [-d (defaults)] [-e (edit)] [-f (fold lines)] [-# (comment-out)] [-h (no names)] [-l (lock types)] [-m (map types)] [-M (master.cf)] [-n (non-defaults)] [-v] [name...]
Use of uninitialized value $mynetworks in scalar chomp at /var/lib/dpkg/tmp.ci/config line 285.
Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/Client/ConfModule.pm line 121.
postconf: invalid option -- 'x'
postconf: fatal: usage: postconf [-a (server SASL types)] [-A (client SASL types)] [-b (bounce templates)] [-c config_dir] [-C param_class] [-d (defaults)] [-e (edit)] [-f (fold lines)] [-# (comment-out)] [-h (no names)] [-l (lock types)] [-m (map types)] [-M (master.cf)] [-n (non-defaults)] [-v] [name...]
Use of uninitialized value $protos in scalar chomp at /var/lib/dpkg/tmp.ci/config line 387.
Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/Client/ConfModule.pm line 121.
postconf: invalid option -- 'x'
postconf: fatal: usage: postconf [-a (server SASL types)] [-A (client SASL types)] [-b (bounce templates)] [-c config_dir] [-C param_class] [-d (defaults)] [-e (edit)] [-f (fold lines)] [-# (comment-out)] [-h (no names)] [-l (lock types)] [-m (map types)] [-M (master.cf)] [-n (non-defaults)] [-v] [name...]
postconf: invalid option -- 'x'
postconf: fatal: usage: postconf [-a (server SASL types)] [-A (client SASL types)] [-b (bounce templates)] [-c config_dir] [-C param_class] [-d (defaults)] [-e (edit)] [-f (fold lines)] [-# (comment-out)] [-h (no names)] [-l (lock types)] [-m (map types)] [-M (master.cf)] [-n (non-defaults)] [-v] [name...]
dpkg: erreur de traitement de l'archive /var/cache/apt/archives/postfix_3.2.2-1_amd64.deb (--unpack) :
le sous-processus nouveau script pre-installation a retourné une erreur de sortie d'état 1
Des erreurs ont été rencontrées pendant l'exécution :
/var/cache/apt/archives/postfix_3.2.2-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@srv-ispconfig:~#
这是 apt-cache policy postfix 的输出(抱歉,是法语)
postfix:
Installé : 3.2.2-1
Candidat : 3.2.2-1
Table de version :
*** 3.2.2-1 0
500 http://ftp.debian.org/debian/ sid/main amd64 Packages
100 /var/lib/dpkg/status
2.9.6-2 0
500 http://ftp.fr.debian.org/debian/ wheezy/main amd64 Packages
真的很奇怪:
我做了一个新的 apt-get update 和 apt-get Upgrade,一切都很好,我不明白为什么!
非常感谢你的帮助。
答案1
我相信这个问题是由于https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848686其中“-x”已添加到预安装挂钩中。
我可以通过首先将 postfix 从 jessie (oldstable) 升级到版本 2.11.3-1+deb8u2,然后升级到stretch (stable) 来解决这个问题。
答案2
虽然上述用户没有分享如何进行实际升级。当我确定下一个版本修复了特定问题时,我就会对有问题的软件包执行此操作。
首先制作一个依赖包列表,并尝试先升级所有依赖包,例如 postfix 有相当多的依赖、冲突、建议等,这意味着你必须做出选择 -
[$] apt-cache depends postfix
postfix
Depends: libc6
Depends: libdb5.3
Depends: libicu57
Depends: libsasl2-2
Depends: libssl1.1
|Depends: debconf
Depends: <debconf-2.0>
cdebconf
debconf
Depends: init-system-helpers
Depends: netbase
Depends: adduser
Depends: dpkg
dpkg:i386
Depends: lsb-base
Depends: ssl-cert
Depends: cpio
cpio:i386
Conflicts: <mail-transport-agent>
citadel-server
courier-mta
dma:i386
dma
esmtp-run
exim4-daemon-heavy
exim4-daemon-light
masqmail
msmtp-mta
nullmailer
opensmtpd
qmail-run
sendmail-bin
ssmtp
Conflicts: <smail>
Recommends: python3
Suggests: procmail
Suggests: postfix-mysql
Suggests: postfix-pgsql
Suggests: postfix-ldap
Suggests: postfix-pcre
Suggests: postfix-lmdb
Suggests: postfix-sqlite
Suggests: sasl2-bin
Suggests: libsasl2-modules
Suggests: <dovecot-common>
dovecot-core
Suggests: resolvconf
openresolv
Suggests: postfix-cdb
Suggests: <mail-reader>
balsa
bsd-mailx
claws-mail:i386
claws-mail
edbrowse
emacs24
emacs24-lucid
emacs24-nox
emacs25
emacs25-lucid
emacs25-nox
evolution
gnumail.app
im
jed
kmail
mailutils
mailutils-mh
mew
mew-beta
mew-beta-bin
mew-bin
mmh
mutt
nmh
s-nail
sup-mail
sylpheed
thunderbird
tkrat
vm
wl
wl-beta
xemacs21-mule
xemacs21-mule-canna-wnn
xemacs21-nomule
xjed
Suggests: ufw
Suggests: postfix-doc
Replaces: <mail-transport-agent>
citadel-server
courier-mta
dma:i386
dma
esmtp-run
exim4-daemon-heavy
exim4-daemon-light
masqmail
msmtp-mta
nullmailer
opensmtpd
postfix
qmail-run
sendmail-bin
ssmtp
我会首先备份所有 postfix 配置文件,然后如果可能的话清除 postfix -
$ sudo aptitude purge postfix
如果有效,则尝试更新/升级底层依赖链,直到它可以正常工作为止。
然后去PTR页面(Packagetracking页面)packages.debian.org,下载具体版本
https://packages.debian.org/jessie/amd64/postfix/download
从离您最近的镜像下载并尝试通过 dpkg 安装。如果某些依赖项不是同一版本,DPKG 会抱怨。如果你的 /etc/apt/sources.list 中有 jessie,那么就升级到那个,如果你想直接从 wheezy 跳到拉伸,那么按照我上面分享的方式下载所有依赖包,在 shell 中执行并做好准备对于任何可能的破损..
Debian 中只有黄金法则,不要惊慌,有足够的时间进行修改。如果你头脑清醒并且有时间修补,那么这个问题可以很容易地解决。请记住在虚拟终端中进行所有修改,并在执行此类操作时推迟 X。如果您在执行此操作时遇到任何问题,请通过提出新问题并提供旧问题的链接来与我们分享,以便人们知道您来自哪里。希望你的 postfix 安装得到修复。您可以做的另一件事是检查 postfix 版本发行说明以了解拉伸,以了解进行了哪些更改以及是否存在一些不兼容的更改,并修复相应的配置文件。