Xupeng's blog

圆外之大,心向往之

遭遇gentoo的循环依赖(circular dependencies)问题

前几天要装gnome时就遇到了这个问题,当时手头有别的事情就给搁下了,几天要装sun-jdk时又遇到了同样的问题:
osr usr # emerge -pv sun-jdk

These are the packages that would be merged, in order:

Calculating dependencies... done!
!!!
Error: circular dependencies:

ebuild / net-libs/gnutls-1.4.4-r1 merge depends on
   ebuild
/ dev-libs/lzo-2.02-r1 merge (hard)
ebuild / media-libs/alsa-lib-1.0.13 merge depends on
   ebuild
/ app-doc/doxygen-1.4.7 merge (hard)
ebuild / app-text/ghostscript-gpl-8.54 merge depends on
   ebuild
/ net-print/cups-1.2.4 merge (hard)
ebuild / net-print/foomatic-filters-3.0.20060720 merge depends on
   ebuild
/ net-print/cups-1.2.4 merge (hard)
   
ebuild / virtual/ghostscript-0 merge (hard)
ebuild / app-doc/doxygen-1.4.7 merge depends on
   ebuild
/ virtual/ghostscript-0 merge (hard)
ebuild / virtual/ghostscript-0 merge depends on
   ebuild
/ app-text/ghostscript-gpl-8.54 merge (medium)
   
ebuild / net-print/cups-1.2.4 merge (soft)
ebuild / sys-apps/dbus-0.62-r1 merge depends on
   ebuild
/ app-doc/doxygen-1.4.7 merge (hard)
ebuild / dev-lang/nasm-0.98.39-r3 merge depends on
   ebuild
/ virtual/ghostscript-0 merge (hard)
ebuild / dev-libs/lzo-2.02-r1 merge depends on
   ebuild
/ dev-lang/nasm-0.98.39-r3 merge (hard)
ebuild / dev-java/sun-jdk-1.5.0.08 merge depends on
   ebuild
/ media-libs/alsa-lib-1.0.13 merge (medium)
ebuild / net-print/foomatic-filters-ppds-20060720 merge depends on
   ebuild
/ net-print/foomatic-filters-3.0.20060720 merge (medium)
   
ebuild / net-print/cups-1.2.4 merge (soft)
ebuild / net-print/cups-1.2.4 merge depends on
   ebuild
/ sys-apps/dbus-0.62-r1 merge (hard)
   
ebuild / net-libs/gnutls-1.4.4-r1 merge (hard)
osr usr #

起初怀疑罪魁祸首是gnutls,安装sun-jdk需要安装它,它又依赖别的包,最终别的包又依赖gnutls早成了死循环以至无法安装,在linuxsir上发了帖子描述这个问题,一边又自己折腾起来。

上面的输出可以看出是cups依赖gnutls造成了循环,于是我编辑cups的ebuild去掉了它对gnutls的依赖,再次emerge -pv sun-jdk,依然是循环依赖,不过跟上次已经大不一样了,这次造成循环的是doxygen,doxygen是一个文档系统,我想起来我的make.conf中有doc这个USE,不会是它的问题吧,试试看,去掉make.conf中的doc USE,再试试,晕,一切正常,没有可恶的循环依赖了。

看来真正的罪魁祸首是doc这个USE,使用全局的USE还是要小心啊,同样遇到循环依赖问题的gentoo lovers可要引以为戒了,遇到这样的问题多看看自己的USE吧,没准就是这样的一粒沙子坏了走远路的脚了,呵呵。

Comments