由于 systemd 问题,从 19.10 升级到 20.04 时出现问题

由于 systemd 问题,从 19.10 升级到 20.04 时出现问题

这类似于从 19.10 升级到 20.04 失败。但是,就我而言,apt remove libc6-udeb并没有解决这个问题。也没有

root@jeffs-desktop:~# apt --fix-broken install systemd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
systemd is already the newest version (245.4-4ubuntu3.2).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libcrypt-openssl-bignum-perl : Depends: perl (>= 5.30.0-7) but 5.28.1-6build1 is to be installed
                                Depends: perlapi-5.30.0
 libcrypt-openssl-random-perl : Depends: perl (>= 5.30.0-7) but 5.28.1-6build1 is to be installed
                                Depends: perlapi-5.30.0
 libcrypt-openssl-rsa-perl : Depends: perl (>= 5.30.0-7) but 5.28.1-6build1 is to be installed
                             Depends: perlapi-5.30.0
 python3-systemd : Depends: python3 (>= 3.8~) but 3.7.5-1 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
root@jeffs-desktop:~# more /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"
root@jeffs-desktop:~# 

似乎无论我尝试什么,我总是得到相同的结果:

Setting up systemd (245.4-4ubuntu3.2) ...
systemd-machine-id-setup: /usr/lib/x86_64-linux-gnu/libcrypt.so.1: version `XCRYPT_2.0' not found (required by /lib/systemd/libsystemd-shared-245.so)
systemd-machine-id-setup: /usr/lib/x86_64-linux-gnu/libcrypt.so.1: version `XCRYPT_4.4' not found (required by /lib/systemd/libsystemd-shared-245.so)
dpkg: error processing package systemd (--configure):
 installed systemd package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 systemd
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@jeffs-desktop:~# 

我是不是要说“去他的吧”然后从 USB 安装 20.04 了?

答案1

  • 您可以安装apt install libcrypt-dev它将添加/usr/lib/x86_64-linux-gnu/libcrypt.so
  • 你可以apt install -f尝试解决这个问题
  • 您还可以尝试(强制)重新安装,apt install --reinstall systemd这将拉取依赖项

相关内容