libc6 :取决于:libc-bin (= 2.15-0ubuntu10) 但已安装 2.15-0ubuntu10.5

Jam*_*ber 1 upgrade package-management apt

问题

所以我从 Ubuntu 服务器 8.04->10.04->12.04 升级后遇到了这个问题。

初始命令

apt-get install -f

dpkg: warning: files list file for package `tcpd' missing, assuming package has no files currently installed.
dpkg: warning: files list file for package `python-pkg-resources' missing, assuming package has no files currently installed.
.... Many many more of these warnings
dpkg: warning: files list file for package `libxml-libxml-perl' missing, assuming no files currently installed.

(Reading database ... 1126 files and directories currently installed.)
Preparing to replace libc6 2.15-0ubuntu10 (using .../libc6_2.15-0ubuntu10.5_i386.deb) ...

A copy of the C library was found in an unexpected directory:
  '/lib/i386-linux-gnu/libc-2.15.so'
It is not safe to upgrade the C library in this situation;
please remove that copy of the C library or get it out of
'/lib/i386-linux-gnu' and try again.

dpkg: error processing /var/cache/apt/archives/libc6_2.15-0ubuntu10.5_i386.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/libc6_2.15-0ubuntu10.5_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)

我尝试过的事情

  • 我尝试移动 libc-2.15.so 但这会产生错误: apt-get: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
  • apt-get --purge remove libc6这不会libc6按照系统的需要工作
  • sudo apt-get install --reinstall libc6=2.15-0ubuntu10.5 libc6-dev=2.15-0ubuntu10.5只是猜测工作但这也不起作用。

不管怎样,正如你所看到的,我被卡住了,我无法升级我的任何软件包......

我的源列表取自这里https://help.ubuntu.com/12.04/sample/sources.list

小智 5

跑步 :

sudo dpkg -r libc6

sudo rm /var/cache/apt/archives/libc6_2.15-0ubuntu10.5_i386.deb
Run Code Online (Sandbox Code Playgroud)

如果以上成功或失败,请运行:

gksudo gedit /var/lib/dpkg/status
Run Code Online (Sandbox Code Playgroud)

在生成的 gedit 中,删除以 开头的整个部分:

Package : libc6

然后运行更新。如果这不能解决问题,您需要格式化。