0

我正在尝试安装 postfix 以使用 SMTP,但是当我尝试安装它时收到错误消息:

# apt-get install postfix -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done

Suggested packages:
  procmail postfix-mysql postfix-pgsql postfix-ldap postfix-pcre postfix-lmdb postfix-sqlite sasl2-bin | dovecot-common resolvconf postfix-cdb ufw postfix-doc
The following NEW packages will be installed:
  postfix
0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
Need to get 0 B/1,519 kB of archives.
After this operation, 4,440 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package postfix.
dpkg: warning: files list file for package 'libvirt-clients' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libvirt0:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libvirt-glib-1.0-0:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libvirt-daemon-system' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libvirt-daemon' missing; assuming package has no files currently installed
(Reading database ... 220287 files and directories currently installed.)
Preparing to unpack .../postfix_3.4.14-0+deb10u1_amd64.deb ...
Unpacking postfix (3.4.14-0+deb10u1) ...
Setting up postfix (3.4.14-0+deb10u1) ...
Adding system user `postfix' (UID 115) ...
Adding new user `postfix' (UID 115) with group `postfix' ...
useradd: cannot open /etc/passwd
adduser: `/sbin/useradd -d /var/spool/postfix -g postfix -s /usr/sbin/nologin -u 115 postfix' returned error code 1. Exiting.
dpkg: error processing package postfix (--configure):
 installed postfix package post-installation script subprocess returned error exit status 1
Processing triggers for systemd (241-7~deb10u8) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for rsyslog (8.1901.0-1) ...
Errors were encountered while processing:
 postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)

如果我尝试使用dpkg-reconfigure postfix,则输出显示 Postfix 已损坏或未完全安装。

 #  dpkg-reconfigure postfix
/usr/sbin/dpkg-reconfigure: postfix is broken or not fully installed

我已尝试使用apt-get -f install, apt remove --purge postfix, apt autocleanapt autoremove然后尝试再次安装,但始终出现错误。

任何帮助,将不胜感激。谢谢

4

0 回答 0