I am encountering an issue on my Raspberry Pi when trying to use the timedatectl
command. When I execute timedatectl status
I get the following error message:
spaikon@raspberrypi:~ $ timedatectl status
Failed to query server: Transport endpoint is not connected
spaikon@raspberrypi:~ $ sudo timedatectl status
Failed to query server: The name org.freedesktop.timedate1 was not provided by any .service files
$ sudo timedatectl show
Failed to parse bus message: No route to host
$ sudo systemctl status systemd-timedated.service
● systemd-timedated.service - Time & Date Service
Loaded: loaded (/lib/systemd/system/systemd-timedated.service; static)
Active: inactive (dead)
Docs: man:systemd-timedated.service(8)
man:localtime(5)
man:org.freedesktop.timedate1(5)
I've tried to find a solution online, but haven't had any luck so far. I'm not sure what these errors mean or how to resolve them. Has anyone else encountered this issue and found a solution?
Any help would be greatly appreciated.
Thank you in advance!
Edit:
$ sudo systemctl status systemd-timedated.service
● systemd-timedated.service - Time & Date Service
Loaded: loaded (/lib/systemd/system/systemd-timedated.service; static)
Active: inactive (dead)
Docs: man:systemd-timedated.service(8)
man:localtime(5)
man:org.freedesktop.timedate1(5)
$ sudo timedatectl
Failed to query server: The name org.freedesktop.timedate1 was not provided by any .service files
$ dlocate -S systemd-timedated.service
systemd: /lib/systemd/system/systemd-timedated.service
systemd: /usr/share/man/man8/systemd-timedated.service.8.gz
Edit 2: Resonse from systemd-timedate Resoponse from
$ journalctl -fu systemd-timedated.service
-- Journal begins at Thu 2023-06-08 20:47:15 EEST. --
Jun 09 12:07:52 raspberrypi systemd[1]: Starting Time & Date Service...
Jun 09 12:07:52 raspberrypi systemd-timedated[46085]: /lib/systemd/systemd-timedated: error while loading shared libraries: li bsystemd-shared-247.so: cannot open shared object file: Permission denied
Jun 09 12:07:52 raspberrypi systemd[1]: systemd-timedated.service: Main process exited, code=exited, status=127/n/a
Jun 09 12:07:52 raspberrypi systemd[1]: systemd-timedated.service: Failed with result 'exit-code'.
Jun 09 12:07:52 raspberrypi systemd[1]: Failed to start Time & Date Service.
Edit 3:
$ namei -mov /lib/systemd/libsystemd-shared-247.so
f: /lib/systemd/libsystemd-shared-247.so
drwx------ spaikon spaikon /
lrwxrwxrwx root root lib -> usr/lib
drwxr-xr-x root root usr
drwxr-xr-x root root lib
drwxr-xr-x root root systemd
-rw-r--r-- root root libsystemd-shared-247.so