破坏了Debian的依赖关系

目前运行Debian Lenny(5.0.9)。 我添加了下面的testing回购安装一个特定的包;

deb http://ftp.debian.org/debian/ testing main contrib deb-src http://ftp.debian.org/debian/ testing main contrib 

但是,现在当我去安装另一个软件包(libc6-dev)时,这是结果;

 The following packages are BROKEN: libc6-dev The following NEW packages will be installed: binutils{a} cpp{a} cpp-4.3{a} gcc{a} gcc-4.3{a} libgmp3c2{a} libgomp1{a} libmpfr1ldbl{a} libtool linux-libc-dev{a} The following packages are RECOMMENDED but will NOT be installed: libltdl3-dev 0 packages upgraded, 11 newly installed, 0 to remove and 1 not upgraded. Need to get 13.6MB of archives. After unpacking 39.7MB will be used. The following packages have unmet dependencies: libc6-dev: Depends: libc6 (= 2.7-18lenny7) but 2.13-21 is installed. The following actions will resolve these dependencies: Keep the following packages at their current version: libc6-dev [Not Installed] libtool [Not Installed] Score is -9872 

我怎样才能得到这个固定的?

不要在lenny(oldstable!)中使用testing包。 如果强制执行此操作,系统将被拧紧。

你为什么这样做? 你想升级哪个软件(以及哪个版本?)

您现在已经部分升级您的系统进行testing,跳过一个稳定版本(挤压)。 这是非常不鼓励的。 这是你的select,因为我会推荐他们:

  • 升级挤压(目前的“稳定”),然后升级到喘息(目前的“testing”)。 你将会进行testing,至less在稳定版发布之前。 如果机器是面向服务器的互联网,或者是生产箱,这不是一个好的select。 testing没有得到及时的安全更新,并经常中断。 如果你想这样做,你应该首先遵循发行说明的lenny => squeeze升级说明第4章 。 然后推断类似的步骤,从挤压到喘息。

  • 重新安装lenny:用aptitude search -F '%p' '~i!~M' p''〜i!〜M aptitude search -F '%p' '~i!~M'备份你的数据,configuration,安装软件包的账号,获得一些安装介质,从头开始安装,还原你的pacakges,还原你的数据和configuration。 它很难推荐一个新的安装lenny,因为它是在二月份,当它将停止接收安全(或其他)更新的生命。

  • 从头开始安装:再次备份数据/configuration,重新安装,还原东西。 挤压,作为目前的稳定版本是一个很好的select。

  • 和你的franckdebian一起生活:如果你需要libc6-dev,你也将不得不安装testing。 你会运行一个不推荐的,而不是经常testingconfiguration,东西可能会中断。

  • 尝试降级:使用apt-show-versions来识别机器上安装的东西,并尝试降级这些软件包(请参阅下面的注释!)。 获取这些软件包的列表,使用apt-cache policy packagename标识当前的lenny版本,然后运行aptitude install package1=thelennyversion package2=thelenyversion...列出所有需要降级的软件包。 这可能不工作,请参阅下面的注释。 请注意,当aptitude想了一会儿,并提出一个关于如何解决依赖关系的解决scheme,并给你提示“你想接受这个解决scheme吗?(Yn)”,你可以说“不”,因为“尝试find另一个解决scheme“。

不幸的是,debian不支持降级软件包。 有时对于某些软件包,它可能在没有configuration更改的版本之间工作,或者没有更改格式的二进制文件,但是这取决于随软件包执行安装/升级/删除的脚本中发生的情况。 你遇到麻烦的软件包(libc6)是系统中最基本的软件包,几乎所有的软件都依赖于这个软件包。