使用apt install命令的错误信息如下所示
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 228 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)
解决办法
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
本文详细介绍了在使用apt install命令时遇到的错误,包括连接到Upstart失败、dpkg错误、依赖问题以及未完全安装或移除的问题。提供了具体的解决步骤,如使用apt-get purge和autoremove命令来清理配置问题,最后重新安装git。
3647

被折叠的 条评论
为什么被折叠?



