在 Ubuntu 16.04.5 LTS 中在终端下安装或删除应用程序时出现问题

在 Ubuntu 16.04.5 LTS 中在终端下安装或删除应用程序时出现问题

我寻求您的帮助,因为我尝试了所有我知道的方法,但无法解决我的问题。如果我尝试使用“apt-get install / apt-get update / apt-get purge”,我会收到以下错误:

 Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 exim4 : Depends: exim4-daemon-light but it is not installed or
                  exim4-daemon-heavy but it is not installed or
                  exim4-daemon-custom but it is not installable
 exim4-base : Depends: exim4-config (>= 4.82) but it is not installed or
                       exim4-config-2
E: Unmet dependencies. Try using -f.

当然,我尝试运行“apt-get -f install”,但它只是指出了这个错误:

    apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  exim4-config exim4-daemon-light
The following packages will be REMOVED:
  postfix
The following NEW packages will be installed:
  exim4-config exim4-daemon-light
0 upgraded, 2 newly installed, 1 to remove and 157 not upgraded.
3 not fully installed or removed.
Need to get 0 B/762 kB of archives.
After this operation, 1,498 kB disk space will be freed.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
dpkg: warning: ignoring request to remove exim4-config, only the config
 files of which are on the system; use --purge to remove them too
Selecting previously unselected package exim4-config.
dpkg: regarding .../exim4-config_4.86.2-2ubuntu2.3_all.deb containing exim4-config:
 exim4-config conflicts with postfix
  postfix (version 3.1.0-3ubuntu0.3) is present and broken due to postinst failure.

dpkg: error processing archive /var/cache/apt/archives/exim4-config_4.86.2-2ubuntu2.3_all.deb (--unpack):
 conflicting packages - not installing exim4-config
Errors were encountered while processing:
 /var/cache/apt/archives/exim4-config_4.86.2-2ubuntu2.3_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

任何帮助都非常感谢!谢谢

dpkg --configure -a 输出以下内容:

 `dpkg: error processing package exim4 (--configure):
 dependency problems - leaving unconfigured
Setting up libgnutls-openssl27:amd64 (3.4.10-4ubuntu1.5) ...
Setting up libc-dev-bin (2.23-0ubuntu11) ...
Setting up libc6-dev:amd64 (2.23-0ubuntu11) ...
Setting up postfix (3.1.0-3ubuntu0.3) ...

Postfix configuration was not changed.  If you need to make changes, edit
/etc/postfix/main.cf (and others) as needed.  To view Postfix configuration
values, see postconf(1).

After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.

Running newaliases
Job for postfix.service failed because the control process exited with error code. See "systemctl status postfix.service" and "journalctl -xe" for details.
invoke-rc.d: initscript postfix, action "restart" failed.
● postfix.service - LSB: Postfix Mail Transport Agent
   Loaded: loaded (/etc/init.d/postfix; bad; vendor preset: enabled)
  Drop-In: /run/systemd/generator/postfix.service.d
           └─50-postfix-$mail-transport-agent.conf
   Active: failed (Result: exit-code) since Wed 2019-06-05 16:10:42 CEST; 20ms ago
     Docs: man:systemd-sysv-generator(8)
  Process: 17094 ExecStart=/etc/init.d/postfix start (code=exited, status=1/FAILURE)

Jun 05 16:10:41 mail postfix[17190]: See http://www.postfix.org/COMPATIBILITY_README.html for details
Jun 05 16:10:41 mail postfix[17190]: To disable backwards compatibility use "postconf compatibility_level=2" and "postfix reload"
Jun 05 16:10:41 mail postfix[17094]: /usr/lib/postfix/sbin/post-install: Error: /etc/postfix/postfix-files is not a file.
Jun 05 16:10:41 mail postfix/postfix-script[17207]: warning: unable to create missing queue directories
Jun 05 16:10:41 mail postfix/postfix-script[17208]: fatal: Postfix integrity check failed!
Jun 05 16:10:42 mail postfix[17094]:    ...fail!
Jun 05 16:10:42 mail systemd[1]: postfix.service: Control process exited, code=exited status=1
Jun 05 16:10:42 mail systemd[1]: Failed to start LSB: Postfix Mail Transport Agent.
Jun 05 16:10:42 mail systemd[1]: postfix.service: Unit entered failed state.
Jun 05 16:10:42 mail systemd[1]: postfix.service: Failed with result 'exit-code'.
dpkg: error processing package postfix (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
 exim4-base
 exim4
 postfix
`

相关内容