无法在 ubuntu16.04 上安装 git

无法在 ubuntu16.04 上安装 git

我正在尝试在 Ubuntu 16.04 上安装 git sudo apt-get install git

Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 27 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:
 runit
 git-daemon-run
E: Sub-process /usr/bin/dpkg returned an error code (1)

如果你有任何想法请帮忙

答案1

尝试运行

sudo apt-get update

然后

sudo apt-get install git

如果这不能解决你的问题,请检查是否可以从Ubuntu 软件中心

如果仍然遇到问题,请前往github 页面,下载 zip 并安装。

相关内容