Debian 不稳定盒中有一个旧版本的软件包,拒绝更新,导致安装中断

Debian 不稳定盒中有一个旧版本的软件包,拒绝更新,导致安装中断

我需要安装 python-twisted,所以......

$ sudo aptitude install python-twisted
[[...]]
The following packages have unmet dependencies:
 python-twisted-mail: Depends: python-twisted-core (>= 10.1) but
10.0.0-3 is to be installed.
 python-twisted-news: Depends: python-twisted-core (>= 10.1) but
10.0.0-3 is to be installed.
 python-twisted-words: Depends: python-twisted-core (>= 10.1) but
10.0.0-3 is to be installed.
 python-twisted-names: Depends: python-twisted-core (>= 10.1) but
10.0.0-3 is to be installed.
The following actions will resolve these dependencies:
[[...]]

哦。所以它不会安装 python-twisted,因为它依赖于...嘿,等一下...我们来检查一下... http://packages.debian.org/sid/python-twisted-core说最新版本是 10.1.0-1...

$ sudo aptitude update
[[...]]
$ aptitude show python-twisted-core
Package: python-twisted-core
New: yes
State: not installed
Version: 10.0.0-3
Priority: optional
[[...]]
$ apt-cache policy python-twisted-core
python-twisted-core:
  Installed: (none)
  Candidate: 10.0.0-3
  Version table:
     10.0.0-3 0
        500 http://ftp.us.debian.org unstable/main Packages

嗯。所以,出于某种原因,aptitude 仍然认为 10.0.0-3 是最新版本。但事实并非如此。为什么?是我用的镜像有问题,还是因为有恶意存储库?

$ cat /etc/apt/sources.list
deb http://ftp.us.debian.org/debian/ unstable main contrib non-free
deb-src http://ftp.us.debian.org/debian/ unstable main contrib non-free

好的,我使用的是主 Debian 镜像,升级已经一天了,所以现在应该可以处理任何 cron 延迟了……但它仍然有问题。我甚至在全新安装的 Debian Unstable 上尝试了上述操作,但问题仍然没有解决。我现在完全不知道该怎么办了。也许 Server Fault 的人员可以提供帮助。

答案1

根据 的输出apt-cache policy python-twisted-core,apt 看不到版本 10.1.0-1 存在。它显示版本 10.0.0-3 可以从您期望的源安装。

仅供参考,问题可能是您忘记运行apt-get update(或类似的东西,例如aptitude update),或者更新命令由于某种原因(例如网络错误)失败。但我不认为这就是您遇到的情况。

问题可能是镜像不是最新的。但我检查了一下,它似乎与其他镜像有相同的内容。

你没有说你使用的是哪种架构。我猜你的架构还没有更新的版本。

软件包通常需要几天时间才能出现在所有体系结构中,因为某些体系结构比其他体系结构具有更强的构建计算能力。虽然python-twisted-core与体系结构无关,但其源包却并非如此。您可以通过查看来自同一来源的与体系结构相关的软件包的页面。我发现截至今天,i386 有 10.1.0-1,但 amd64 仍然有 10.0.0-3。python-twisted-mail来自不同的软件包,由于它依赖于架构,因此传播得很快。

测试可以帮您避免这种担忧。除非您真的需要更新的版本,否则从测试中获取所有 python-twisted 软件包很有可能会解决您的问题。最简单的方法是将测试添加到您的软件包中sources.list(因为来自测试的软件包比来自不稳定的软件包更旧,因此除非您明确要求,否则这不会改变安装的内容),然后在 aptitude 的交互式 UI 中手动选择 10.0.0-3 版本。

答案2

幕后的真正问题可以解释为相关的 debian-user 线程

谢谢,我明白了。问题是 twisted 源包(构建 python-twisted 二进制包)尚未在 amd64 上上传,尽管 python-twisted 是一个 arch:all 包,但它仍保留在旧版本。

以前,arch:all 包在所有 arch 上都是同步的,但是当 foo(arch:any)依赖于相同源版本的 foo-common(arch:all)并且 foo 尚未构建时,这通常会导致无法卸载,因此 ftp-masters 对此进行了更改。

在这种情况下,这会产生不良的副作用,即来自 不同的源包依赖于新版本的 python-twisted-core,使其在 amd64 上无法卸载。

所以,是的。正如 Gilles 的回答,问题在于该软件包不是为 amd64 构建的,但由于主要软件包部分与平台无关,因此它在混乱中被放错了位置。我想是这样的。但不用担心,只需按照 Gilles 的回答中描述的方法操作即可,将您的问题通知给其中一个 debian 邮件列表(例如debian 用户),希望他们有点困惑错误报告,要有耐心。这一切都会过去的。尤其是在 Sid。

相关内容