我正在使用SSH键连接到云服务器(OVH),现在我试图重新启动apache并获得以下错误:
ubuntu@server-1:~$ service apache2 reload
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to reload 'apache2.service'.
Authenticating as: Ubuntu (ubuntu)
Password:
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
==== AUTHENTICATION FAILED ===
Failed to reload apache2.service: Access denied
See system logs and 'systemctl status apache2.service' for details.如何解决这个问题?
发布于 2017-06-30 20:26:42
必须使用sudo运行该命令,如下所示:
sudo service apache2 reload更新:
如果您有sudo: unable to resolve host server-1问题,那么您需要通过/etc/hostname和/etc/hosts修复主机名,并重新启动您的linux机器才能生效。然后再重试上面的命令。
有关此问题的更多详细信息:(运行sudo时出现错误消息:无法解析主机(无)
发布于 2017-06-08 08:57:34
一种选择是禁用政策工具包(如果你知道你在做什么)
sudo apt-get remove libpolkit-agent-1-0发布于 2018-05-30 12:39:58
您可以通过这个命令找到语法错误-
sudo apache2ctl configtest修正错误。一切都会好起来的。
https://askubuntu.com/questions/844416
复制相似问题