Ubuntu 16.04无法关闭电源:poweroff.target已禁用

Ubuntu 16.04不会关机。 当我转到屏幕右上角的图标并单击关机时,它不会关闭。 我shutdown -h now运行shutdown -h now ,这就是我得到的:

 tanner@tanner-x151x:~$ shutdown -h now Failed to set wall message, ignoring: Interactive authentication required. Failed to power off system via logind: Interactive authentication required. Failed to start poweroff target: Interactive authentication required. See system logs and 'systemctl status poweroff.target' for details. Failed to open /dev/initctl: Permission denied Failed to talk to init daemon. tanner@tanner-x151x:~$ sudo shutdown -h now [sudo] password for tanner: Failed to start poweroff target: Transaction is destructive. 5ee system logs and 'systemctl status poweroff.target' for details. tanner@tanner-x151x:~$ sudo halt now Too many arguments. tanner@tanner-x151x:~$ systemctl status poweroff.target poweroff.target - Power-off Loaded: loaded (/lib/systemd/system/poweroff.target; disabled; vendor preset: Active: inactive (dead) Docs: man:systemd.special(7) 

我不知道为什么会发生这种情况或如何解决这个问题。 任何帮助,将不胜感激。

应该通过输入此命令来启用“poweroff.target”的systemd服务来解决此问题:

 systemctl enable poweroff.target 

这有点残酷,但你可以尝试:

sudo poweroff -f

答案信用在这里: https : //askubuntu.com/a/788559/580637