在 Debian 12 Bookworm 上启用 Cockpit 项目时出错

在 Debian 12 Bookworm 上启用 Cockpit 项目时出错

我安装了 cockpit,看到状态为未激活且未启用。首先,我启动了服务。成功了。我能够访问 Web 控制台。但是当我尝试启用开机启动时。我收到此消息。

The unit files have no installation config (WantedBy=, RequiredBy=, Also=,
Alias= settings in the [Install] section, and DefaultInstance= for template
units). This means they are not meant to be enabled using systemctl.

Possible reasons for having this kind of units are:
• A unit may be statically enabled by being symlinked from another unit's
  .wants/ or .requires/ directory.
• A unit's purpose may be to act as a helper for some other unit which has
  a requirement dependency on it.
• A unit may be started when needed via activation (socket, path, timer,
  D-Bus, udev, scripted systemctl call, ...).
• In case of template units, the unit is meant to be enabled with some
  instance name specified.

如何纠正这个问题...我只是在配置了 NAT 和仅主机网络的 VirtualBox 上测试这个问题。

答案1

可能有帮助!!!

以下是简要概述:

这可能是因为 cockpit 是一个套接字服务,而你试图将其启用为守护服务,这导致了错误。只需运行以下命令:

$ sudo systemctl enable cockpit.socket

看看问题是否仍然存在。

相关内容