安装 git-all 时出现“无法连接到 Upstart”错误

Ele*_*cks 22 dpkg upstart git

我正在使用 15.04。

所以我正在使用 git 并安装了标准版本。我设置了 ssh 密钥,并且能够将我的存储库之一克隆到正确的文件夹。一切都很好,然后我决定安装更多软件包是个好主意。我跑了sudo apt-get install git-all。我正在查看错误代码,现在必须处理暴发户。

start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: error processing package runit (--configure):
 subprocess installed post-installation script returned error exit status 1
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
Errors were encountered while processing:
 runit
 git-daemon-run
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)

当我什至更新/升级我的系统时,就会发生这种情况。在这一点上,我要做的就是能够安装软件并更新我当前的软件。有什么办法可以扭转这个问题或至少纠正它吗?

编辑:谢天谢地,这个问题在发生后一两天就解决了。接受的答案完美地解决了我的问题

Anw*_*war 22

这是因为这个错误https://bugs.launchpad.net/ubuntu/+source/runit/+bug/1448164

您需要删除runitgit-daemon-run。那应该可以解决问题。

sudo apt-get purge runit git-daemon-run
Run Code Online (Sandbox Code Playgroud)

不要忘记访问错误报告并单击是,此错误影响了我

git-all 没有错误

似乎您可以git-all使用守护程序支持而不会因此错误而失败。git-all推荐git-daemon-rungit-daemon-sysvinit包。aptgit-daemon-run选为第一选择。但是如果你明确提到你想要的包(即git-daemon-sysvinit),apt就不会尝试安装git-daemon-run.

你需要做的就是

sudo apt-get install git-all git-daemon-sysvinit
Run Code Online (Sandbox Code Playgroud)

希望有帮助。

  • 我从 [this answer](http://askubuntu.com/a/796682/61218) 得到了错误链接,从 [Zanna 的评论](http://askubuntu.com/questions/820065/installing) 得到了该答案的链接-git-all-causing-problem-on-16-04-1#comment1243584_820065) 在问题下方。感谢他们。@BillalBEGUERADJ (2认同)

sai*_*895 13

您需要强行删除runit. 跑步sudo dpkg -r runit应该有效。您可能需要使用其中一种--force-*选项。

  • `git-daemon-run` 依赖于 `runit`,所以我删除了它,然后删除了 `runit`。现在测试 git 是否仍然有效。然而,这确实解决了我当前的问题! (4认同)

Sco*_*gan 5

尝试:

sudo apt update 
sudo apt --purge remove git 
sudo apt install git
Run Code Online (Sandbox Code Playgroud)

反而。