dpkg: 处理软件包 libc-bin 时出错(--configure)

dpkg: 处理软件包 libc-bin 时出错(--configure)

升级到 Ubuntu 16.04 后,我无法更新系统。通常情况下,更新后会出现以下情况:

apt-get upgrade

我收到此错误:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up libc-bin (2.23-0ubuntu3) ...
Segmentation fault (core dumped)
/sbin/ldconfig.real: Can't stat /lib/i686-linux-gnu: No such file or directory
/sbin/ldconfig.real: Can't stat /usr/lib/i686-linux-gnu: No such file or directory
/sbin/ldconfig.real: Path `/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once
Segmentation fault (core dumped)
dpkg: error processing package libc-bin (--configure):
 subprocess installed post-installation script returned error exit status 139
Errors were encountered while processing:
 libc-bin
E: Sub-process /usr/bin/dpkg returned an error code (1)

关于如何修复此问题,您有什么想法吗?apt-get cleanapt-get -f install什么也没做。

答案1

如果它在 WSL 中,请尝试(tks lifesaver.codes)

sudo mv /var/lib/dpkg/info/libc-bin.* /tmp/

sudo dpkg --remove --force-remove-reinstreq libc-bin

sudo dpkg --purge libc-bin

sudo apt install libc-bin

sudo mv /tmp/libc-bin.* /var/lib/dpkg/info/

答案2

这里的原因似乎是一个腐败的/var/cache/ldconfig/aux-cache

解决方案是(以 root 身份)执行以下操作:

rm /var/cache/ldconfig/aux-cache

然后执行

/sbin/ldconfig

答案3

我以前在这里遇到过同样的错误,我执行了以下命令:

 sudo apt-get --reinstall install libc-bin

它起作用了,重新安装了libc-bin软件包并解决了这个问题。

希望能帮助到你

答案4

我必须在 WSL Ubuntu 20.04 上sudo rm /var/cache/ldconfig/aux-cache运行。sudo /sbin/ldconfig.real

相关内容