Score:1

Ubuntu 20.04 failed to fetch dependencies

ca flag

I'm trying to install systemd-timesyncd with apt install systemd-timesyncd and retrive 404 error.

➜  ~ apt install systemd-timesyncd

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 'apt autoremove' to remove them.
The following NEW packages will be installed:
  systemd-timesyncd
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 28.0 kB of archives.
After this operation, 243 kB of additional disk space will be used.
Err:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 systemd-timesyncd amd64 245.4-4ubuntu3.2
  404  Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/s/systemd/systemd-timesyncd_245.4-4ubuntu3.2_amd64.deb  404  Not Found [IP: 91.189.88.142 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Anyone can help me?

EDIT

 / apt update
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Reading package lists... Done
E: Release file for http://archive.ubuntu.com/ubuntu/dists/focal/InRelease is not valid yet (invalid for another 370d 10h 17min 57s). Updates for this repository will not be applied.
E: Release file for http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease is not valid yet (invalid for another 998d 2h 18min 54s). Updates for this repository will not be applied.
E: Release file for http://archive.ubuntu.com/ubuntu/dists/focal-security/InRelease is not valid yet (invalid for another 998d 2h 18min 20s). Updates for this repository will not be applied.

➜  / date
Fri Apr 19 09:15:17 CEST 2019

➜  / timedatectl status
               Local time: Fri 2019-04-19 09:15:27 CEST
           Universal time: Fri 2019-04-19 07:15:27 UTC
                 RTC time: n/a
                Time zone: Europe/Madrid (CEST, +0200)
System clock synchronized: no
              NTP service: n/a
          RTC in local TZ: no

➜  / sudo hwclock --hctosys --verbose
hwclock from util-linux 2.34
System Time: 1555659408.378273
Trying to open: /dev/rtc0
Trying to open: /dev/rtc
Trying to open: /dev/misc/rtc
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.

guiverc avatar
cn flag
Update your software lists (ie. `sudo apt update`) and check for issues; the package you pasted is very *outdated* as what's available now is `systemd-timesyncd | 245.4-4ubuntu3.14 | focal-updates | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x` Once your software lists are *up to date* your system will look & find the correct package.
xabikip avatar
ca flag
@guiverc When `apt update` i have this error `E: Release file for http://es.archive.ubuntu.com/ubuntu/dists/focal/InRelease is not valid yet (invalid for another 370d 10h 26min 19s). Updates for this repository will not be applied.` I think the problem is my datetime `date -> Fri Apr 19 09:07:46 CEST 2019` That is the reason that i need to install systemd-timesyncd
guiverc avatar
cn flag
Check your system clock & timezone; though 370 days out means it's more than timezone but invalid clock. Correct your systems date & time.
Someone avatar
my flag
Run: `sudo hwclock --hctosys`
xabikip avatar
ca flag
@guiverc that is what i'm trying, correct the date and time. More info in question on edit part. @Someone when run `sudo hwclock --hctosys` i have this message `hwclock: Cannot access the Hardware Clock via any known method.` I put verbose mode info in question on edit part.
Someone avatar
my flag
Hmm... Run: `cat /sys/devices/system/clocksource/clocksource0/available_clocksource` and provide the output.
xabikip avatar
ca flag
@Someone I run `cat /sys/devices/system/clocksource/clocksource0/available_clocksource tsc hpet acpi_pm` I don't know if it's important but my server is a virtual ubuntu server on a LXC container of proxmox.
Someone avatar
my flag
Found the issue.
xabikip avatar
ca flag
@Someone and what is the issue? is not correct clocksource?......if you can help me I'd be very gratefull
Someone avatar
my flag
@xabikip Posted an answer
Someone avatar
my flag
Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/133087/discussion-between-someone-and-xabikip).
Score:1
my flag

This seems like an issue with your system time. The repository wasn't valid at the time your system is frozen on. Take a look at this answer on Server fault:

The problem seems to be connected to clocksource, check available_clocksource:

$ cat /sys/devices/system/clocksource/clocksource0/available_clocksource
tsc hpet acpi_pm

Based on answer to "What does “clocksource tsc unstable” mean?" it looks like TSC (Time Stamp Counter) is not very reliable.

By updating /etc/default/grub you can switch to another available clocksource. I'm using HPET.

GRUB_CMDLINE_LINUX_DEFAULT="clocksource=hpet"

and updating grub:

update-grub2

After reboot hwclock works again (just reboot without any modification might have helped as well - it might be just question for how long).

NOTE: Optimal clocksource might depend on your motherboard and CPU model.

So, follow these steps to correct your time:

  1. Edit /etc/default/grub as root using a text editor (eg:- sudo gedit /etc/default/grub)

  2. Locate the line GRUB_CMDLINE_LINUX_DEFAULT="".

  3. Change the line to look like:

    GRUB_CMDLINE_LINUX_DEFAULT="clocksource=hpet"
    
  4. Update grub:

    sudo update-grub
    
  5. Reboot to confirm:

    sudo reboot
    
  6. Now update again:

    sudo apt update
    
  7. Install the package:

    sudo apt install systemd-timesyncd
    
xabikip avatar
ca flag
I have not grub file in `/etc/default` -> `/etc/default ls apache-htcacheclean bsdmainutils console-setup cron dbus irqbalance keyboard locale mysql networkd-dispatcher nss ntp rcS rsync ssh ufw useradd`
xabikip avatar
ca flag
My server is a virtual ubuntu server on a LXC container of proxmox
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.