如果 apt-get -f 安装失败怎么办?

如果 apt-get -f 安装失败怎么办?

我的处境很困难。

使用 Debian Jessie / Stretchapt-get -f install失败。

系统实际上被卡住了。我现在已经ssh进去了。就登录终端而言,只有一个可用。 (即只有alt-ctrl-F1在真机上调出了登录终端,alt-ctrl-f[2-5]失败)。

它似乎与列出的错误有关这里。尽管存在多个问题:krb-kdc 无法解压,因为已达到 PolicyKit 超时(g-io-error-quark, 24),然后解压 krb5-admin-server 时出错,并且出现必须启用 LDAP 的错误消息(尽管它已启用并且连接正常)。

也就是说,apt-get 存在多次超时(对于PolicyKit 位来说似乎)。至于网络,我把超时时间设置为1200,似乎没有效果。完整的错误消息:

The following extra packages will be installed:
  krb5-admin-server krb5-kdc
Suggested packages:
  openbsd-inetd inet-superserver krb5-kdc-ldap
The following packages will be upgraded:
  krb5-admin-server krb5-kdc
2 upgraded, 0 newly installed, 0 to remove and 73 not upgraded.
9 not fully installed or removed.
Need to get 0 B/320 kB of archives.
After this operation, 115 kB disk space will be freed.
Do you want to continue? [Y/n]
Reading changelogs... Done
Preconfiguring packages ...
(Reading database ... 296869 files and directories currently installed.)
Preparing to unpack .../krb5-kdc_1.13.2+dfsg-2_amd64.deb ...
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24)
Failed to execute operation: Connection timed out
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24)
Failed to stop krb5-kdc.service: Connection timed out
Failed to get load state of krb5-kdc.service: Connection timed out
invoke-rc.d: initscript krb5-kdc, action "stop" failed.
failed to stop krb5-kdc
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24)
Failed to execute operation: Connection timed out
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24)
Failed to stop krb5-kdc.service: Connection timed out
Failed to get load state of krb5-kdc.service: Connection timed out
invoke-rc.d: initscript krb5-kdc, action "stop" failed.
failed to stop krb5-kdc
dpkg: error processing archive /var/cache/apt/archives/krb5-kdc_1.13.2+dfsg-2_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24)
Failed to execute operation: Connection timed out
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24)
Failed to execute operation: Connection timed out
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24)
Failed to start krb5-kdc.service: Connection timed out
invoke-rc.d: initscript krb5-kdc, action "start" failed.
Preparing to unpack .../krb5-admin-server_1.13.2+dfsg-2_amd64.deb ...
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24)
Failed to execute operation: Connection timed out
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24)
Failed to stop krb5-admin-server.service: Connection timed out
Failed to get load state of krb5-admin-server.service: Connection timed out
invoke-rc.d: initscript krb5-admin-server, action "stop" failed.
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24)
Failed to execute operation: Connection timed out
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: GDBus.Error:org.freedesktop.DBus.Error.TimedOut: Activation of org.freedesktop.PolicyKit1 timed out (g-dbus-error-quark, 20)
Failed to stop krb5-admin-server.service: Connection timed out
Failed to get load state of krb5-admin-server.service: Connection timed out
invoke-rc.d: initscript krb5-admin-server, action "stop" failed.
dpkg: error processing archive /var/cache/apt/archives/krb5-admin-server_1.13.2+dfsg-2_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
insserv: Service ldap has to be enabled to start service krb5-admin-server
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/krb5-kdc_1.13.2+dfsg-2_amd64.deb
 /var/cache/apt/archives/krb5-admin-server_1.13.2+dfsg-2_amd64.deb
Error: Timeout was reached
E: Sub-process /usr/bin/dpkg returned an error code (1)

问题:

  1. 我还能做什么来强迫apt-get -f install
  2. 强制回滚到 Jessie 会有帮助吗?

相关内容