通过 systemd 激活单元“dbus-org.freedesktop.resolve1.service”失败:未找到单元 dbus-org.freedesktop.resolve1.service

通过 systemd 激活单元“dbus-org.freedesktop.resolve1.service”失败:未找到单元 dbus-org.freedesktop.resolve1.service

我正在使用 manjaro / arch linux,在系统日志中看到以下错误消息。

journalctl -f 
...
dbus-daemon[798]: [system] Activating via systemd: service name='org.freedesktop.resolve1' unit='dbus-org.freedesktop.resolve1.service' requested by ':1.4' (uid=0 pid=799 comm="/usr/bin/>
dbus-daemon[798]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.resolve1.service': Unit dbus-org.freedesktop.resolve1.service not found.
...

如何修复此问题

答案1

network-manager该问题与和有关systemd-resolved.service

阅读后manjaro 论坛拱门维基

您有 2 个选择

配置网络管理器不使用 systemd-resolved.service

vim /etc/NetworkManager/conf.d/no-systemd-resolved.conf

包含此内容:

[main]
systemd-resolved=false

激活并使用 systemd-resolved.service

检查它是否正在运行并启用

systemctl status systemd-resolved.service
● systemd-resolved.service - Network Name Resolution
  Loaded: loaded (/usr/lib/systemd/system/systemd-resolved.service; disabled; vendor preset: enabled)
  Active: inactive (dead)
    Docs: man:systemd-resolved.service(8)
          https://www.freedesktop.org/wiki/Software/systemd/resolved
          https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
          https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients

启用并启动它。

systemctl enable systemd-resolved.service
Created symlink /etc/systemd/system/dbus-org.freedesktop.resolve1.service → /usr/lib/systemd/system/systemd-resolved.service.
Created symlink /etc/systemd/system/multi-user.target.wants/systemd-resolved.service → /usr/lib/systemd/system/systemd-resolved.service.
systemctl start systemd-resolved.service
systemctl status systemd-resolved.service
● systemd-resolved.service - Network Name Resolution
  Loaded: loaded (/usr/lib/systemd/system/systemd-resolved.service; enabled; vendor preset: enabled)
  Active: active (running) since Fri 2019-04-19 10:36:53 SAST; 32min ago
    Docs: man:systemd-resolved.service(8)
          https://www.freedesktop.org/wiki/Software/systemd/resolved
          https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
          https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
Main PID: 21150 (systemd-resolve)
  Status: "Processing requests..."
    Tasks: 1 (limit: 4915)
  Memory: 5.0M
  CGroup: /system.slice/systemd-resolved.service
          └─21150 /usr/lib/systemd/systemd-resolved

这解决了日志中出现的错误。

相关内容