安装git-all时“无法连接到Upstart”错误
我使用的是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)
当我甚至更新/升级我的系统时会发生这种情况。 此时我要做的就是能够安装软件并更新我当前的软件。 有什么方法可以解决这个问题或者至少纠正它吗?
编辑:谢天谢地,这个问题在发生后仅一两天就解决了。 接受的答案非常有效,并处理了我的问题
你需要强行删除runit
。 运行sudo dpkg -r runit
应该可行。 您可能需要使用--force-*
选项之一。
它正在发生,因为这个错误https://bugs.launchpad.net/ubuntu/+source/runit/+bug/1448164
您需要删除runit
和git-daemon-run
。 这应该解决问题。
sudo apt-get purge runit git-daemon-run
不要忘记访问错误报告并单击是,此错误会影响我 。
git-all
没有错误
看来你可以使用守护程序支持git-all
而不会出现此错误。 git-all
建议使用git-daemon-run
或git-daemon-sysvinit
包。 apt
选择git-daemon-run
作为首选。 但是如果你明确提到你想要的包(即git-daemon-sysvinit
),那么apt
将不会尝试安装git-daemon-run
。
你需要做的就是
sudo apt-get install git-all git-daemon-sysvinit
希望有所帮助。
尝试:
sudo apt update sudo apt --purge remove git sudo apt install git
代替。
尝试卸载git-all
,安装git-daemon-sysvinit
,然后再次安装git-all
。 如果你看一下Synaptic中的包属性,你会发现git-all
依赖于git-daemon-run
或 git-daemon-sysvinit
。 git-daemon-run
是由于某种原因默认安装的,即使它在Ubuntu 15.04及更高版本中被破坏了。 (参见https://bugs.launchpad.net/ubuntu/+source/runit/+bug/1448164 )但是如果先手动安装git-daemon-sysvinit
,那么git-all
的依赖关系将被一个包满足这实际上有效。 然后你可以安装git-all
,一切都应该没问题。
您可能正在虚拟主机下使用Ubuntu。 如果是这样,您将需要使用以下步骤修改initctl以返回true。 首先,您需要告诉dpkg,您将使用以下命令更改upstart软件包安装:
sudo dpkg-divert --local --rename --add /sbin/initctl
然后,您需要创建一个虚拟initctl作为true的链接:
ln -s /bin/true /sbin/initctl