systemd-resolve doesn't work

I’m trying to enable mDNS on this device but whenever I run systemd-resolve I get the error sd_bus_open_system: No such file or directory. I can run --help and get the help screen and --version gives me this:

systemd 241 (241)
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid

However, --status produces the above error, as does --set-mdns. What’s wrong here?

Thanks!

Hi,

by default DietPi is running with limited amount of packages. This include dbus package as well. Therefore it would need to be installed.

apt update
apt install dbus
systemctl enable dbus
reboot

probably systemd-resolved service to be started as well

systemctl enable systemd-resolved.service --force

Ah! That did it. Thank you! :smiley: