dpkg:处理包时出错(Ubuntu 16.04)

dpkg:处理包时出错(Ubuntu 16.04)

我正在运行 Ubuntu 16.04。安装 git(以及后来的 git-all)后,每当我尝试运行“sudo apt-get upgrade”时,都会收到以下错误。

Setting up runit (2.1.2-3ubuntu1) ... start: Unable to connect to
Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection
refused dpkg: error processing package runit (--configure): 
subprocess installed post-installation script returned error exit
status 1 No apport report written because the error message indicates
it's a follow-up error from a previous failure.
No apport report written because MaxReports has already been reached
dpkg: dependency problems prevent configuration of git-daemon-run:  git-daemon-run depends on runit; however:   Package
runit is not configured yet.

dpkg: error processing package git-daemon-run (--configure): 
dependency problems - leaving unconfigured dpkg: error processing
package imagemagick-6.q16 (--configure):  package is in a very bad
inconsistent state; you should  reinstall it before attempting
configuration dpkg: dependency problems prevent configuration of
imagemagick:  imagemagick depends on imagemagick-6.q16 (=
8:6.8.9.9-7ubuntu5.1); however:   Package imagemagick-6.q16 is not
configured yet.

pkg: error processing package imagemagick (--configure):  dependency
problems - leaving unconfigured Errors were encountered while
processing:  runit  git-daemon-run  imagemagick-6.q16  imagemagick E:
Sub-process /usr/bin/dpkg returned an error code (1)

帮助?

答案1

事实证明,安装 git-all 会破坏 Ubuntu 16.04。在此处找到修复方法:

无法连接到套接字 /com/ubuntu/upstart:连接被拒绝:处理时遇到错误:runit

答案2

在终端中输入:

dpkg --configure -a
apt autoremove
apt -f install
apt update
apt upgrade

相关内容