apt-get – 分段错误:error handling包libc-bin

嗨,我在过去的一个月里一直在努力。

sudo apt-get upgradesudo apt-get autoremove出错,出现以下错误

 E: Unmet dependencies. Try using -f. 

当我运行sudo apt-get install -f ,它出错如下。

 Fetched 30.2 MB in 32s (928 kB/s) Preconfiguring packages ... Setting up libc-bin (2.23-0ubuntu9) ... Segmentation fault /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 `/usr/local/lib' given more than once /sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once /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 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) 

1)问题发布在这里链接 。 但提到的答案是针对用户的。

2)如前所述链接 ,我尝试了sudo apt-get --reinstall install libc-bin 。 但这表明了

 E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). 

3) sudo dpkg --configure -a出错如下

 Errors were encountered while processing: libosmesa6:i386 libgl1-mesa-dri:i386 libglapi-mesa:i386 libgl1-mesa-glx:amd64 libgl1-mesa-glx:i386 libegl1-mesa:amd64 xserver-xephyr xserver-xorg-core libgl1-mesa-dev:i386 libwayland-egl1-mesa:amd64 

任何帮助都将受到高度赞赏,因为这是一台配置了我所有学术项目的机器,因此无法承担重新安装的费用。

编辑:

4) sudo dpkg --configure -D 777 libc-bin给出以下输出:

 D000001: ensure_diversions: new, (re)loading D000001: process queue pkg libc-bin:amd64 queue.len 0 progress 1, try 1 D000040: checking dependencies of libc-bin:amd64 (- ) D000400: checking group ... D000400: checking possibility -> libc6 D000400: checking non-provided pkg libc6:amd64 D000400: is installed, ok and found D000400: found 3 D000400: found 3 matched 0 possfixbytrig - D000400: checking group ... D000400: checking possibility -> libc6 D000400: checking non-provided pkg libc6:amd64 D000400: is installed, ok and found D000400: found 3 D000400: found 3 matched 0 possfixbytrig - D000040: ok 2 msgs >><< D000040: checking Breaks D000400: checking breaker locales:all virtbroken  Setting up libc-bin (2.23-0ubuntu9) ... D000002: fork/exec /var/lib/dpkg/info/libc-bin.postinst ( configure 2.23-0ubuntu9 ) Segmentation fault /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 `/usr/local/lib' given more than once /sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once /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 dpkg: error processing package libc-bin (--configure): subprocess installed post-installation script returned error exit status 139 D000001: ensure_diversions: same, skipping Errors were encountered while processing: libc-bin 

编辑:

5)我正在尝试这里提到的解决方案链接 。 但是sudo mv /usr/lib/x86_64-linux-gnu/libtic.so.5.9 /root给出了错误

 mv: cannot stat '/usr/lib/x86_64-linux-gnu/libtic.so.5.9': No such file or directory 

这是否意味着在我的情况下,其他一些库导致了这个问题?

编辑 :我能够在sudo apt-get install -f期间做一个strace, 这里有日志; 如果这有助于任何人。

6)我试图增加这里提到的APT缓存限制。 但它没有帮助。

编辑更新 Elder Geek建议的答案

7)我用memtest测试了我的ram并没有显示任何错误。 我还在我的硬盘上进行了SMART自检(简称),显示“磁盘正常”。

8)我已手动检查,该位置中不存在此特定库/usr/lib/x86_64-linux-gnu/libtic.so.5.9 。 (所以我相信我的系统中不存在这样的库,而其他一些库导致了这个问题。)

9)我的系统中没有路径/usr/lib/i686-linux-gnu

10)有一个错字,我正在检查原始答案中提到的/etc/apt/sources.lst 。 我有一个sources.list

这些是我在那里看到的条目。 我没有看到那里提到的任何ppa。

 deb http://archive.canonical.com/ubuntu xenial partner # deb-src http://archive.canonical.com/ubuntu trusty partner deb http://archive.ubuntu.com/ubuntu xenial main universe restricted deb http://security.ubuntu.com/ubuntu/ xenial-security main restricted universe deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe 

此外,我无法安装任何ppa管理器,因为apt本身已损坏,我无法安装任何东西。

11)附加信息:这最初是14.04系统,升级到16.04。 我在14.04的那些ppas在升级过程中被禁用了。 然而,这次升级发生在差不多一年前,系统运行了近一年。

12)最后也是最重要的:我记得在所有问题开始出现之前的一段时间内执行sudo apt-get dist-upgrade 。 这可能是造成这个问题的原因吗?

虽然分段错误通常与尝试访问受限区域内存的编写不良的代码相关联,但我不认为这是您的问题的原因。 虽然不常见,但这些故障也可能由行为不当的硬件引起。 首先,通过在系统上运行memtest确保您拥有稳定的环境,并确保在使用交换时您的硬盘状态良好 。 如果发现有故障的硬件,请更换它。

不能统计

表示文件或目录不存在,或者您的用户甚至无法通过sudo访问它。 您可以通过ls -l /lib/i686-linux-gnu命令检查权限。 由于没有/usr/lib/i686-linux-gnu ,我可以在64位版本的Ubuntu中找到(假设基于Path /usr/lib/x86_64-linux-gnu given more than once )。

根据您提供的信息,我的最佳评估是,其中一些错误的根本原因是您的软件来源中的条目不正确。 这些可以在/etc/apt/sources.lst文件或/etc/apt/sources.list.d目录中的列表中找到。 您可能会开始尝试清除它如何移除PPA?

如果您使用GUI运行桌面,您可能更喜欢Y PPA Manager ,这是执行此类任务的有用工具。

如果对此答案有任何疑惑或不清楚,请发表评论,我会尽力澄清。

编辑:进一步评估,以涵盖自该答案最初编写以来提出的其他要点。

7)在没有故障硬件的情况下,我们需要深入挖掘一下

8)自第5点以来非常清楚。

9)从第4点开始也清楚。

重新编辑 10)拥有有效的/etc/apt/sources.list意味着您不需要替换它。

11)我有一个系统也从14.04升级到16.04,我的/etc/apt/sources.list仍然完整,因为你现在报告你的。

12)根据本评论中甜点提到的错误,这似乎是可能的。

此时,选项有限。 在这里他们没有特别的顺序。 随意选择一个看起来最不痛苦的。

1)恢复到以前的备份

2)备份用户数据(无论如何你应该这样做)并从头开始安装

3)修复您的安装。 下载apt 及其所有依赖项,并使用dpkg -i packagename重新安装它们