[root@rocky9 ~]# systemctl enable --now cockpit
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 or disabled 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.
原因是设置自启cockpit要用如下命令
systemctl enable --now cockpit.socket
如果有其他服务也报了这个错,可以在服务文件中加入install模块
如下所示
[root@rocky9 ~]# vim /usr/lib/systemd/system/cockpit.service
[Install]
WantedBy=multi-user.target
发表评论