Ubuntu – Problem installing package git-all


I am trying to install git-all using the following commands:

sudo apt update
sudo apt install git-all

and I get the following results:

jonathan@Aristotle:~$ sudo apt install git-all
Reading package lists... Done
Building dependency tree       
Reading state information... Done
git-all is already the newest version (1:2.7.4-0ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
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
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
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

I found this response to a similar question:
but none of the solutions mentioned in it worked for me. Any ideas on how I can proceed from here?

Best Answer

I discovered that this is a Ubuntu bug that has been reported as https://bugs.launchpad.net/ubuntu/+source/runit/+bug/1448164.

The problem exists because runit depends on upstart and Ubuntu changed to using systemd in 15.04. The workaround is as follows:

sudo apt-get purge runit
sudo apt-get purge git-all
sudo apt-get purge git
sudo apt-get autoremove
sudo apt update
sudo apt install git

Basically you completely get rid of runit, git-all and git, cleanup the apt database and then re-install git. Instead of installing git-all again cherry pick the packages that you actually need and install those.

Related Question