我使用 Ubuntu 14.04。运行时apt-get -f install
我得到以下输出:
(Reading database ... 314897 files and directories currently installed.)
Preparing to unpack .../click_0.4.46+17.10.20170607.3-0~622~ubuntu14.04.1_amd64.deb ...
Failed to issue method call: Unit click-system-hooks.service not loaded.
dpkg: warning: subprocess old pre-removal script returned error exit status 5
dpkg: trying script from the new package instead ...
Failed to issue method call: Unit click-system-hooks.service not loaded.
dpkg: error processing archive /var/cache/apt/archives/click_0.4.46+17.10.20170607.3-0~622~ubuntu14.04.1_amd64.deb (--unpack):
subprocess new pre-removal script returned error exit status 5
Failed to issue method call: Unit click-system-hooks.service failed to load: No such file or directory. See system logs and 'systemctl status click-system-hooks.service' for details.
Errors were encountered while processing:
/var/cache/apt/archives/click_0.4.46+17.10.20170607.3-0~622~ubuntu14.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
我在 16.10 上遇到了同样的问题并使用了:
sudo rm /usr/bin/click
sudo apt --fix-broken install
此后,一切又开始正常运转。