linux noob here. Been trying to setup git and having some difficulty setting up a repository and linking it to git hub. But that is another issue. while trying to figure this out I used the following commands one after another at various times to try and install the correct packages I need
apt-get install git
apt-get install git-core
and finally
apt-get install git-all
While running the last command I received the following error
E: Sub-process /usr/bin/dpkg returned an error code (1)
I have searched the site to try and find a solution but it seems to be case dependent so I ran
sudo apt-get install -f
and got the following output
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-31 linux-headers-4.4.0-31-generic linux-headers- 4.4.0-38
linux-headers-4.4.0-38-generic linux-image-4.4.0-31-generic
linux-image-4.4.0-38-generic linux-image-extra-4.4.0-31-generic
linux-image-extra-4.4.0-38-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 45 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
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 it a followup error from a previous failure.
Errors were encountered while processing: runit git-daemon-run
E: Sub-process /usr/bin/dpkg returned an error code (1)
Can someone tell me which file is causing the error and how I can fix it. Also some details as to why this happens or any useful info would be greatly appreciated. Thanks