升级到8.10 intrepid过程中libc6依赖性死循环问题的解决

依然是采取从源升级的方式,不过却遇到了依赖性死循环:

fwolf@svr6:~$ sudo apt-get install
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: Depends: findutils (>= 4.4.0-2ubuntu2) but 4.2.28-2 is installed
  libc6-dev: Depends: libc6 (= 2.5-0ubuntu14) but 2.8~20080505-0ubuntu7 is installed
  libc6-i686: PreDepends: libc6 (= 2.5-0ubuntu14) but 2.8~20080505-0ubuntu7 is installed
E: Unmet dependencies. Try using -f.

使用-f参数也无济于事:

fwolf@svr6:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  findutils libc6-dev libc6-i686
Suggested packages:
  mlocate locate slocate glibc-doc manpages-dev
The following packages will be upgraded:
  findutils libc6-dev libc6-i686
3 upgraded, 0 newly installed, 0 to remove and 362 not upgraded.
5 not fully installed or removed.
Need to get 0B/5077kB of archives.
After unpacking 1561kB of additional disk space will be used.
Do you want to continue [Y/n]? y
E: Couldn't configure pre-depend libc6 for findutils, probably a dependency cycle.

看到没,libc6依赖findutils 4.4以上,而升级findutils又依赖libc6,所以陷入死循环,可以尝试这样解决,前提是相关的deb包都已经用apt下载到了本地cache里:

fwolf@svr6:~$ cd /var/cache/apt/archives
fwolf@svr6:/var/cache/apt/archives$ sudo dpkg --force-depends --install libc6_2.8~20080505-0ubuntu7_i386.deb findutils_4.4.0-2ubuntu3_i386.deb

强制直接安装这两个冤家包,然后是libc6相关的这两个重要包:

sudo aptitude install libc6-i686 libc6-dev

然后,再进行其它upgrade就都正常了。

参考

[coreutils and debianutils dependency cycle on reinstall command](https://bugs.launchpad.net/ubuntu/+source/aptitude/+bug/124895)

6 thoughts on “升级到8.10 intrepid过程中libc6依赖性死循环问题的解决”

  1. 前提是相关的deb包都已经用apt下载到了本地cache里: 这句话怎么理解? 郁闷中…

    1. 就是说你执行apt或者aptitude,下载文件的过程已经完成, 在安装(即configure)的时候出错中止了, 那么就可以采取本文中的方式来处理。

Leave a Reply

Your email address will not be published. Required fields are marked *