zoukankan      html  css  js  c++  java
  • apt-get upgrade failure with libc

    来源:http://askubuntu.com/questions/381762/apt-get-upgrade-failure-with-libc

    Q:

    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    You might want to run 'apt-get -f install' to correct these.
    The following packages have unmet dependencies:
     libc6 : Breaks: libc6:i386 (!= 2.17-0ubuntu5) but 2.17-0ubuntu5.1 is installed
     libc6:i386 : Breaks: libc6 (!= 2.17-0ubuntu5.1) but 2.17-0ubuntu5 is installed
     libc6-dbg : Depends: libc6 (= 2.17-0ubuntu5.1) but 2.17-0ubuntu5 is installed
     libc6-dev : Depends: libc6 (= 2.17-0ubuntu5.1) but 2.17-0ubuntu5 is installed
                 Depends: libc-dev-bin (= 2.17-0ubuntu5.1)
     libc6-dev:i386 : Depends: libc-dev-bin:i386 (= 2.17-0ubuntu5.1)
                      Recommends: gcc:i386 but it is not installed or
                                  c-compiler:i386
     libc6-i386 : Depends: libc6 (= 2.17-0ubuntu5.1) but 2.17-0ubuntu5 is installed
     libc6-x32 : Depends: libc6 (= 2.17-0ubuntu5.1) but 2.17-0ubuntu5 is installed
    E: Unmet dependencies. Try using -f.
    A:

    First of all go here /lib/x86_64-linux-gnu move these files to /root: libc-2.17.so libdl-2.17.so libm-2.17.so libpthread-2.17.so librt-2.17.so

    Commands to go into the directory /lib/x86_64-linux-gnu and copy the files to /root,

    sudo -s
    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
    

    Then you need to launch bash with predefined LD_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
    

    Commands to remove the files in /lib/x86_64-linux-gnu directory,

    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
    

    after that dist-upgrade or fix-missing package will works:

    apt-get -f install
    

    OR

    apt-get -f dist-upgrade
    
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    You might want to run 'apt-get -f install' to correct these.
    The following packages have unmet dependencies:
     libc6 : Breaks: libc6:i386 (!= 2.17-0ubuntu5) but 2.17-0ubuntu5.1 is installed
     libc6:i386 : Breaks: libc6 (!= 2.17-0ubuntu5.1) but 2.17-0ubuntu5 is installed
     libc6-dbg : Depends: libc6 (= 2.17-0ubuntu5.1) but 2.17-0ubuntu5 is installed
     libc6-dev : Depends: libc6 (= 2.17-0ubuntu5.1) but 2.17-0ubuntu5 is installed
                 Depends: libc-dev-bin (= 2.17-0ubuntu5.1)
     libc6-dev:i386 : Depends: libc-dev-bin:i386 (= 2.17-0ubuntu5.1)
                      Recommends: gcc:i386 but it is not installed or
                                  c-compiler:i386
     libc6-i386 : Depends: libc6 (= 2.17-0ubuntu5.1) but 2.17-0ubuntu5 is installed
     libc6-x32 : Depends: libc6 (= 2.17-0ubuntu5.1) but 2.17-0ubuntu5 is installed
    E: Unmet dependencies. Try using -f.
  • 相关阅读:
    康威定律和系统设计——《微服务设计》读书笔记
    安全——《微服务设计》读书笔记
    监控——《微服务设计》读书笔记
    测试——《微服务设计》读书笔记
    [转]Linux 系统挂载数据盘
    部署:持续集成(CI)与持续交付(CD)——《微服务设计》读书笔记
    拆分:分解单块系统——《微服务设计》读书笔记
    Unused Method(不再使用的方法)——Dead Code(死亡代码)
    使用Fortify进行代码静态分析(系列文章)
    NEUACM1132: Renew MST Quickly 增量最小生成树
  • 原文地址:https://www.cnblogs.com/Amagasaki/p/3710811.html
Copyright © 2011-2022 走看看