apt:/lib/aarch64-linux-gnu/libc.so.6:未找到版本“GLIBC_2.27”(/usr/lib/aarch64-linux-gnu/libapt-pkg.so.5.0 所需)

apt:/lib/aarch64-linux-gnu/libc.so.6:未找到版本“GLIBC_2.27”(/usr/lib/aarch64-linux-gnu/libapt-pkg.so.5.0 所需)

我认为我犯了一个大错误,试图在我的 jetson nano 上安装的 ubuntu 18.04 (arm64) 上安装错误的 libc6 包,因为现在操作系统根本无法工作了,我不知道如何解决这个问题。

root@ziomario-desktop:~/Scaricati/arm64# dpkg -i libc6_2.24-11+deb9u4_arm64.deb

dpkg: attenzione: downgrade of libc6:arm64 from version 2.27-3ubuntu1.4 to 2.24-11+deb9u4
(reading from database... 323470 file e directory actually installed.)
Preparing for extracting libc6_2.24-11+deb9u4_arm64.deb...
De-configuration of libc6:armhf (2.27-3ubuntu1.4)...
Extraction of libc6:arm64 (2.24-11+deb9u4) su (2.27-3ubuntu1.4)...
dpkg: error trying to process package libc6:arm64 (--install):
 package libc6:arm64 2.24-11+deb9u4 can't be configured why libc6:armhf has a different version (2.27-3ubuntu1.4)
dpkg: error trying to elaborate package libc6:armhf (--install):
 package libc6:armhf 2.27-3ubuntu1.4 can't be configured why libc6:arm64 has a different version (2.24-11+deb9u4)
Occurred some errors during the processing of :
 libc6:arm64
 libc6:armhf

root@ziomario-desktop:/home# apt update

apt: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.27' not found (required by /usr/lib/aarch64-linux-gnu/libapt-pkg.so.5.0)
apt: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /lib/aarch64-linux-gnu/libudev.so.1)
apt: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /lib/aarch64-linux-gnu/libsystemd.so.0)
apt: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.27' not found (required by /lib/aarch64-linux-gnu/libsystemd.so.0)

sudo dpkg --remove-architecture armhf
cannot remove it because it is currently in use by the database

基本上我什么也做不了,而且我怀疑如果我重新启动主板,ubuntu 将无法正确重新启动。因此,我不得不让主板继续运行,直到我修复错误。当然,我不想从头开始重新安装 ubuntu。请帮助我。谢谢。

答案1

通过运行以下命令修复了该问题:

sudo dpkg -i --force-overwrite libc6_2.27-3ubuntu1.4_arm64.deb

来自手册页:

--force-overwrite: Overwrite one package's file with another's
          file.

相关内容