问题
因此,从 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)
我尝试过的事情
- 我尝试移动 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
答案1
跑步 :
sudo dpkg -r libc6
sudo rm /var/cache/apt/archives/libc6_2.15-0ubuntu10.5_i386.deb
无论以上操作是否成功,请运行:
gksudo gedit /var/lib/dpkg/status
在生成的 gedit 中,删除以 开头的整个部分:
Package : libc6
然后运行更新。如果此问题未解决,则需要格式化。
答案2
您可以按照下列步骤进行操作!它将把你的设置变成Debian 实验版其中包含处于 alpha 开发阶段的软件包。它还可能在此过程中损坏您的系统。引用 Debian FAQ:
此目录包含仍在开发中且仍处于 alpha 测试阶段的软件包和工具。用户不应使用此处的软件包,因为它们可能非常危险,甚至对最有经验的人来说也是有害的。
将其添加到sources.list
:
deb http://ftp.debian.org/debian experimental main
接下来运行:
apt-get update && apt-get install libc6
然后,从文件中删除或注释掉此行sources.list
:
deb http://ftp.debian.org/debian experimental main
最后,再次更新您的包缓存。
apt-get update
此后你将能够使用 libc6 >= 2.17