apt 升级失败:未满足的依赖关系

apt 升级失败:未满足的依赖关系

我有一台 Ubuntu 20.04 服务器。最近我尝试更新它。我遇到了这个错误

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

我按照说明做了,但没有帮助

$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
0 upgraded, 0 newly installed, 0 to remove and 47 not upgraded.
1 not fully installed or removed.
Need to get 0 B/28.1 kB of archives.
After this operation, 0 B of additional disk space will be used.
$ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

我尝试了找到的解决方案但无济于事。

$ sudo dpkg --configure -a
$ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

重启也没用。如果有人能帮忙或者知道是什么原因导致这个问题,我会非常感激。这个服务器对我来说很重要。DNS、文件共享、电影,所有这些有趣的东西都运行在它上面。提前谢谢。

这是最新的 /var/log/apt/term.log,其中包含内容

Log started: 2020-11-25  20:32:55

dpkg: systemd-timesyncd: dependency problems, but removing anyway as you requested:
 systemd depends on systemd-timesyncd | time-daemon; however:
  Package systemd-timesyncd is to be removed.
  Package time-daemon is not installed.
  Package systemd-timesyncd which provides time-daemon is to be removed.
 systemd depends on systemd-timesyncd | time-daemon; however:
  Package systemd-timesyncd is to be removed.
  Package time-daemon is not installed.
  Package systemd-timesyncd which provides time-daemon is to be removed.

(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 197964 files and directories currently installed.)
Removing systemd-timesyncd (245.4-4ubuntu3.3) ...

日志没有结束。下一个日志将在 17 天后开始。另外我不知道它为什么试图删除 systemd-timesyncd...

更新:我尝试重新安装 systemd-timesyncd 并收到此错误, systemd-timesyncd is already the newest version (245.4-4ubuntu3.3). 它表明无论我apt install还是apt --fix-broken install

答案1

事实证明我也遇到过这种情况sudo apt reinstall systemd-timesyncd。现已修复。

相关内容