Ubuntu: “Unable to connect to Upstart” error when installing git-all



Question:

I am using 15.04.

So I'm working with git and I installed the standard version. I set up the ssh keys and was able to clone one of my repositories to the correct folder. Everything was working great and then I decided it was a good idea to install more packages. I ran sudo apt-get install git-all. I'm looking at error codes now having to deal with upstart.

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)  

This is what happens when I even update/upgrade my system. At this point all I'm looking to do is be able to install software and update my current software. Is there any way I can potentially reverse this issue or at least correct it?

Edit: Thankfully this issue was solved only a day or two after it happened. The accepted answer worked perfectly and took care of my issue


Solution:1

You'll need to forcibly remove runit. Running sudo dpkg -r runit should work. You might need to use one of the --force-* options.


Solution:2

It's happening because of this bug https://bugs.launchpad.net/ubuntu/+source/runit/+bug/1448164

You need to remove runit and git-daemon-run. That should fix the problem.

sudo apt-get purge runit git-daemon-run  

Don't forget to visit the bug report and clicking Yes, this bug affects me.

git-all without error

It seems you can have git-all with daemon support without failing on this error. git-all recommends either git-daemon-run or git-daemon-sysvinit package. apt was choosing git-daemon-run as first choice. But If you explicitly mention the package you want (i.e git-daemon-sysvinit), apt won't try to install git-daemon-run.

All you need to do is

sudo apt-get install git-all git-daemon-sysvinit  

Hope that helps.


Solution:3

Try:

sudo apt update   sudo apt --purge remove git   sudo apt install git  

instead.


Solution:4

Try uninstalling git-all, installing git-daemon-sysvinit, then installing git-all again. If you look at the package properties in Synaptic, you will find that git-all depends on either git-daemon-run or git-daemon-sysvinit. git-daemon-run is the one that gets installed by default for some reason, even though it's broken in Ubuntu 15.04 and up. (See https://bugs.launchpad.net/ubuntu/+source/runit/+bug/1448164) But if you install git-daemon-sysvinit manually first, then git-all's dependency will be satisfied, by a package that actually works. You can then install git-all, and everything should be fine.


Solution:5

You are probably using Ubuntu under a virtual host. If so, you will need to modify initctl to return true using the following steps. First, you need to tell dpkg, that you are going to change the upstart package installation using:

sudo dpkg-divert --local --rename --add /sbin/initctl  

Then, you need to create a dummy initctl as a link to true:

ln -s /bin/true /sbin/initctl  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »