当我运行时sudo apt-get update && sudo apt-get dist-upgrade -y
出现以下错误
(Reading database ... 135000 files and directories currently installed.)
Preparing to unpack .../apport_2.20.1-0ubuntu2.15_all.deb ...
Failed to stop apport-forward.socket: Unit apport-forward.socket not loaded.
dpkg: warning: subprocess old pre-removal script returned error exit status 5
dpkg: trying script from the new package instead ...
Failed to stop apport-forward.socket: Unit apport-forward.socket not loaded.
dpkg: error processing archive /var/cache/apt/archives/apport_2.20.1-0ubuntu2.15_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 5
/usr/bin/deb-systemd-helper: error: unable to read apport-forward.socket
Failed to get unit file state for apport-forward.socket: No such file or directory
apport-forward.socket is a disabled or a static unit, not starting it.
Errors were encountered while processing:
/var/cache/apt/archives/apport_2.20.1-0ubuntu2.15_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
我该如何修复此问题?
答案1
您能做的最好的事情就是删除导致问题的软件包(卸载它),下面是一些示例:
- 如何删除/安装未完全安装的软件包?
- 如何从 ubuntu 卸载 plex(您在使用 plex 时没有遇到问题,但是错误消息是相同的,因此最好查看一下它)。
删除导致问题的软件包后,您可以更新系统,并最终重新安装该软件包(如果需要)。
希望这可以帮助。