我无法在 16.04 上重新安装 libc-bin - 如何修复?升级 16.04 至 18.04 失败后出现问题

我无法在 16.04 上重新安装 libc-bin - 如何修复?升级 16.04 至 18.04 失败后出现问题

这台 PC(Dell Optiplex 755)运行的是 Ubuntu 16.04。一周前,我尝试升级到 18.04,但失败并显示“ Aborting. Restoring Original state”消息。从那时起,软件更新程序就失败了,并出现类似 的错误E: Internal Error, No file name for libc-bin:amd64。(其他几个软件包已成功更新。)在升级尝试之前,一切都运行正常。我最近尝试修复问题的方法如下:

$ apt-get download libc-bin
$ sudo dpkg -x libc-bin*.deb /
$ sudo apt-get install --reinstall libc-bin
Reading package lists... Done
Building dependency tree        
Reading state information... Done
0 to upgrade, 0 to newly install, 1 reinstalled, 0 to remove and 3 not to upgrade.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for libc-bin:amd64
~$

我还sudo dpkg --configure -a根据此处的其他帖子尝试了“”。这也会出现错误:

~$ sudo dpkg --configure -a
Setting up libc-bin (2.23-0ubuntu10) ...
Bus error (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
/usr/lib/x86_64-linux-gnu/libfakeroot:
    libfakeroot-0.so -> libfakeroot-tcp.so
/lib/i386-linux-gnu:
Bus error (core dumped)
dpkg: error processing package libc-bin (--configure):
 subprocess installed post-installation script returned error exit status 135
Errors were encountered while processing:
 libc-bin
~$

我的目标不是升级到 18.04,而是让 16.04 再次运行。

OptiPlex-755:~$ apt-cache policy libc-bin:amd64 libc6:i386
libc-bin:
  Installed: 2.23-0ubuntu10
  Candidate: 2.23-0ubuntu10
  Version table:
 *** 2.23-0ubuntu10 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2.23-0ubuntu3 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
libc6:i386:
  Installed: 2.23-0ubuntu10
  Candidate: 2.23-0ubuntu10
  Version table:
 *** 2.23-0ubuntu10 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages
        100 /var/lib/dpkg/status
     2.23-0ubuntu3 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main i386 Packages

OptiPlex-755:~$ dpkg -S /lib/i386-linux-gnu
libuuid1:i386, libc6:i386, libsystemd0:i386, libpng12-0:i386, libglib2.0-0:i386, libncurses5:i386, libusb-1.0-0:i386, libjson-c2:i386, libgcrypt20:i386, libcomerr2:i386, libgcc1:i386, libpcre3:i386, libselinux1:i386, libtinfo5:i386, libgpg-error0:i386, zlib1g:i386, libexpat1:i386, libdbus-1-3:i386, libudev1:i386, libssl1.0.0:i386, libbsd0:i386, libcap2:i386, libwrap0:i386, libkeyutils1:i386, liblzma5:i386: /lib/i386-linux-gnu

OptiPlex-755:~$ grep -r 86 /etc/ld.so.conf.d
/etc/ld.so.conf.d/i386-linux-gnu.conf:/lib/i386-linux-gnu
/etc/ld.so.conf.d/i386-linux-gnu.conf:/usr/lib/i386-linux-gnu
/etc/ld.so.conf.d/i386-linux-gnu.conf:/lib/i686-linux-gnu
/etc/ld.so.conf.d/i386-linux-gnu.conf:/usr/lib/i686-linux-gnu
/etc/ld.so.conf.d/fakeroot-x86_64-linux-gnu.conf:/usr/lib/x86_64-linux-gnu/libfakeroot
/etc/ld.so.conf.d/x86_64-linux-gnu.conf:/lib/x86_64-linux-gnu
/etc/ld.so.conf.d/x86_64-linux-gnu.conf:/usr/lib/x86_64-linux-gnu
OptiPlex-755:~$ 

OptiPlex-755:~$ sudo ldconfig --verbose 
/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
/usr/lib/x86_64-linux-gnu/libfakeroot:
    libfakeroot-0.so -> libfakeroot-tcp.so
/lib/i386-linux-gnu:
Bus error (core dumped)

答案1

也许这能有所帮助

如何让 16.04 中的软件更新正常运行?升级到 18.04 失败后,软件更新就失效了

apt-get download libc-bin
sudo dpkg -x libc-bin*.deb /
sudo apt-get install --reinstall ./libc-bin*.deb

相关内容