问题 ubuntu-advantage-desktop-daemon.service 是一个已禁用或未运行的静态单元,无法启动它

问题 ubuntu-advantage-desktop-daemon.service 是一个已禁用或未运行的静态单元,无法启动它

我的操作系统是 ubuntu 22.04。输入终端后,显示以下消息:

ubuntu-advantage-desktop-daemon.service is a disabled or a static unit not running, not starting it.

如何解决?

答案1

和你一样,我在将 XUbuntu 升级到 jammy (22) 后也遇到了同样的错误消息。所以我不习惯这种错误,但我找到的内容可能会对你有所帮助。所有命令都必须以 root 身份执行,或者建议使用前缀sudo

守护进程包的安装文件之一是 /lib/systemd/system/ubuntu-advantage-desktop-daemon.service,即所谓的单元文件。尝试通过systemctl enable ubuntu-advantage-desktop-daemon.service以下方式启用它会导致出现错误消息:

单元文件没有安装配置([Install] 部分中的 WantedBy=、RequiredBy=、Also=、Alias= 设置,以及模板单元的 DefaultInstance=)。这意味着它们不适合使用 systemctl 启用。

设立此类单位的可能原因有:

• 可以通过从另一个单元的 .wants/ 或 .requires/ 目录进行符号链接来静态启用一个单元。

• 一个单元的目的可能是充当对其有需求依赖关系的其他单元的助手。

• 可以在需要时通过激活(套接字、路径、计时器、D-Bus、udev、脚本 systemctl 调用...)启动单元。

• 对于模板单元,该单元需要通过指定的某个实例名称来启用。

我做了什么:

systemctl disable ubuntu-advantage.service
systemctl enable ubuntu-advantage.service
systemctl disable ubuntu-advantage-desktop-daemon.service (issues error message)
systemctl start ubuntu-advantage-desktop-daemon.service

然后

systemctl -a|grep ubuntu

节目

● ubuntu-advantage-cloud-id-shim.service 未找到 不活动 已死 ubuntu-advantage-cloud-id-shim.service

ubuntu-advantage-desktop-daemon.service 为 Ubuntu Advantage 加载活动运行桌面服务

ubuntu-advantage.service 已加载 未激活 已死 Ubuntu Pro 后台自动连接

下次重启后,既ubuntu-advantage-desktop-daemon.service不会运行也不会加载,但可以通过 启动systemctl start ubuntu-advantage-desktop-daemon.service

由于我不想要商业版的 Ubuntu Advantage,所以我

systemctl disable ubuntu-advantage-desktop-daemon.service

systemctl disable ubuntu-advantage.service

由于您没有详细描述终端中出现错误消息的情况,因此我无法为您提供更多帮助。

您可以在这里找到有关服务和单元文件的更多信息: https://linuxhandbook.com/create-systemd-services/

相关内容