请问,在装有systemd-timesyncd的Ubuntu 20嵌入式设备中,如何优雅开启NTP服务?
发表于 : 2024-09-24 12:41
Ubuntu20.00,预装的systemd-timesyncd只有客户端,没有服务端。直接配置不可行。apt安装ntp或者chrony时,会提示已经存在注册为time-daemon的软件包,不能安装。去apt卸载systemd-timesyncd,则提示系统必须有提供time-daemon服务的软件包,不能卸载。
代码: 全选
root@rocktech:~# apt install chrony
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
chrony : Conflicts: time-daemon
systemd-timesyncd : Conflicts: time-daemon
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
root@rocktech:~# apt remove systemd-timesyncd
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
systemd : Depends: systemd-timesyncd but it is not going to be installed or
time-daemon
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.