酷徒LOGO

关闭 Ubuntu 16.04不能关闭电源: poweroff.target 已经禁用


问题:

我运行了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)



我不知道为什么会发生这种情况,要如何修复?任何帮助将不胜感激。


答案1:

输入此命令以启用systemd服务"poweroff.target"应解决此问题:


systemctl enable poweroff.target




答案2:

sudo poweroff -f






Copyright © 2011 HelpLib All rights reserved.    知识分享协议 京ICP备17041772号-2  |  如果智培  |  酷兔英语  |  帮酷