Как удалить ntp без подключения к интернету?

меня попросили синхронизировать ubuntu 20 через ntp. Обычно я использую системное время для этой миссии. На этом компьютере я сделал таймера и получил:

$ 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

тогда я вижу, что ntp также установлен (btw - это теперь по умолчанию для ubuntu 20). Поэтому я скачал systemd-timesyncd rpm и переместил его в этот pc, а затем запустил:

~$ 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

конфликтующий пакет ntp, поэтому я пытаюсь его удалить:

~$ 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?

Следующие пакеты будут УДАЛЕНЫ: ntp Будут установлены следующие НОВЫЕ пакеты: systemd-timesyncd

но нет подключения к Интернету, поэтому apt не может загрузить и установить systemd-timesyncd, а затем выйти.

есть идеи, как с этим справиться ?

0
задан 8 March 2021 в 16:39

1 ответ

Я скачал Systemd-timesyncd_245.4-4ubuntu3 .3_amd64.deb. Переместил его в / var / cache / apt / archives / Run apt Удалить NTP -Y

Все хорошее сейчас

0
ответ дан 18 March 2021 в 23:28

Другие вопросы по тегам:

Похожие вопросы: