错误信息:
(正在读取数据库 ... 系统当前共安装有 20390 个文件和目录。) 正预备替换 libc6:amd64 2.17-0ubuntu5 (使用 libc6_2.17-0ubuntu5.1_amd64.deb) ... A copy of the C library was found in an unexpected directory: '/lib/x86_64-linux-gnu/libc-2.17.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/x86_64-linux-gnu' and try again. dpkg: error processing libc6_2.17-0ubuntu5.1_amd64.deb (--install): 子进程 新的 pre-installation 脚本 返回了错误号 1 正预备替换 libc6:i386 2.17-0ubuntu5 (使用 libc6_2.17-0ubuntu5.1_i386.deb) ... 正在反配置 libc6:amd64 ... 正在解压缩将用于更替的包文件 libc6:i386 ... dpkg: error processing libc6:i386 (--install): package libc6:i386 2.17-0ubuntu5.1 cannot be configured because libc6:amd64 is at a different version (2.17-0ubuntu5) dpkg: error processing libc6:amd64 (--install): package libc6:amd64 2.17-0ubuntu5 cannot be configured because libc6:i386 is at a different version (2.17-0ubuntu5.1) 在处理时有错误发生: libc6_2.17-0ubuntu5.1_amd64.deb libc6:i386 libc6:amd64
http://my.oschina.net/sunhuaili/blog/203652 解决方案:
解决:
打开/var/lib/dpkg/status文件,查找到libc6的配置
修改libc6的配置,如下
Package: libc6
Status: install ok half-configured
Priority: required
Section: libs
Installed-Size: 8546
Maintainer: GNU Libc Maintainers <[email protected]>
Architecture: i386
Multi-Arch: same
Source: eglibc
Version: 2.13-38+deb7u1
Config-Version: 2.13-38
Replaces: libc6-i386
Provides: glibc-2.13-1
Depends: libc-bin (= 2.13-38), libgcc1
Recommends: libc6-i686
Suggests: glibc-doc, debconf | debconf-2.0, locales
Breaks: locales (<< 2.13), locales-all (<< 2.13), nscd (<< 2.13)
Conflicts: prelink (<= 0.0.20090311-1), tzdata (<< 2007k-1), tzdata-etch
Conffiles:
/etc/ld.so.conf.d/i486-linux-gnu.conf de72af11e0f4e741c2cca3e0e87b7af4
Description: Embedded GNU C Library: Shared libraries
Contains the standard libraries that are used by nearly all programs on
the system. This package includes shared versions of the standard C library
and the standard math library, as well as many others.
Homepage: http://www.eglibc.org
保存
注: 加粗部分要与64位的libc6版本保持一致
结果:
执行apt-get upgrade成功,搞定
--------------------
http://askubuntu.com/questions/381762/apt-get-upgrade-failure-with-libc
I have fix this issue by following your method. But with minor edit of your method:
-
sudo
cd /lib/x86_64-linux-gnu cp libc-2.17.so /root cp libdl-2.17.so /root cp libm-2.17.so /root cp libpthread-2.17.so /root cp librt-2.17.so /root cp ld-2.17.so /root/
mkdir /root/i386
and cd /lib/i386-linux-gnu cp libc-2.17.so /root/i386 cp libdl-2.17.so /root/i386 cp libm-2.17.so /root/i386 cp libpthread-2.17.so /root/i386 cp librt-2.17.so /root/i386 cp ld-2.17.so /root/i386
-
Preload:
LD_PRELOAD=/root/libc-2.17.so:/root/libdl-2.17.so:/root/libm-2.17.so:/root/libpthread-2.17.so:/root/librt-2.17.so bash
-
remove libs:
cd /lib/i386-linux-gnu rm libc-2.17.so rm libdl-2.17.so rm libm-2.17.so rm libpthread-2.17.so rm librt-2.17.so rm ld-2.17.so
cd /lib/x86_64-linux-gnu/ rm libc-2.17.so rm libdl-2.17.so rm libm-2.17.so rm libpthread-2.17.so rm librt-2.17.so rm ld-2.17.so
-
apt-get -f install
I meet error when exec this command "Cannot find file lib6" I recovery it from by:dpkg -i /var/cache/apt/archives/*.deb
anddpkg --configure -a
-
then I can do the dist-upgrade.
apt-get dist-upgrade
----------------------------------------
http://ubuntuforums.org/showthread.php?t=1940074