i was asked to sync ubuntu 20 via ntp. usually im using systemd-timesync for this mission. on this pc i did timedatectrl and got:
$ timedatectl
Local time: Mon 2021-03-08 10:24:24 -05
Universal time: Mon 2021-03-08 15:24:24 UTC
RTC time: Mon 2021-03-08 13:23:56
Time zone: America/Bogota (-05, -0500)
System clock synchronized: no
NTP service: n/a
RTC in local TZ: no
then i see ntp is also installed (btw is this the default for ubuntu 20 now?) so i downloaded the systemd-timesyncd rpm moved it to this pc then run:
~$ sudo dpkg -i systemd-timesyncd_245.4-4ubuntu3_amd64.deb
dpkg: regarding systemd-timesyncd_245.4-4ubuntu3_amd64.deb containing systemd-timesyncd:
systemd-timesyncd conflicts with time-daemon
ntp provides time-daemon and is present and installed.
dpkg: error processing archive systemd-timesyncd_245.4-4ubuntu3_amd64.deb (--install):
conflicting packages - not installing systemd-timesyncd
Errors were encountered while processing:
systemd-timesyncd_245.4-4ubuntu3_amd64.deb
the conflicting package is ntp so i try to remove it:
~$ sudo apt remove ntp
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libevent-core-2.1-7 libevent-pthreads-2.1-7 libopts25 sntp
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
systemd-timesyncd
The following packages will be REMOVED:
ntp
The following NEW packages will be installed:
systemd-timesyncd
0 upgraded, 1 newly installed, 1 to remove and 256 not upgraded.
Need to get 28.1 kB of archives.
After this operation, 1,778 kB disk space will be freed.
Do you want to continue? [Y/n] y
Err:1 http://il.archive.ubuntu.com/ubuntu focal-updates/main amd64 systemd-timesyncd amd64 245.4-4ubuntu3.3
Temporary failure resolving 'il.archive.ubuntu.com'
E: Failed to fetch http://il.archive.ubuntu.com/ubuntu/pool/main/s/systemd/systemd-timesyncd_245.4-4ubuntu3.3_amd64.deb Temporary failure resolving 'il.archive.ubuntu.com'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
The following packages will be REMOVED: ntp The following NEW packages will be installed: systemd-timesyncd
but there is no internet connection so apt cant download and install systemd-timesyncd and then it exit.
any idea how to deal with this ?
dpkg: error processing archive systemd-timesyncd_245.4-4ubuntu3_amd64.deb (--install): conflicting packages - not installing systemd-timesyncd Errors were encountered while processing: systemd-timesyncd_245.4-4ubuntu3_amd64.deb
– David Shuhami Mar 08 '21 at 16:24