使用 apt-get 在 Debian 上安装 Mercurial

使用 apt-get 在 Debian 上安装 Mercurial

我正在尝试使用 apt-get 在运行 Debian 的 Web 服务器上安装 Mercurial。我更希望使用最新的稳定版 Mercurial,但只要是比较新的版本我都愿意。我尝试输入命令,sudo apt-get install mercurial得到了以下响应:

Reading package lists... Done
Building dependency tree... Done
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
  mercurial: Depends: libc6 (>= 2.4) but 2.3.6.ds1-13etch10 is to be installed
             Depends: python (>= 2.5) but 2.4.4-2 is to be installed
             Depends: python-support (>= 0.90.0) but 0.5.6 is to be installed
             Depends: mercurial-common (= 1.7.5-1) but it is not going to be installed
  trac: Depends: python-genshi but it is not installable
W: Couldn't stat source package list http://debian.newdream.net etch/main Packages (/var/lib/apt/lists/debian.newdream.net_dists_etch_main_binary-amd64_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://debian.newdream.net etch/non-free Packages (/var/lib/apt/lists/debian.newdream.net_dists_etch_non-free_binary-amd64_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://debian.newdream.net etch/contrib Packages (/var/lib/apt/lists/debian.newdream.net_dists_etch_contrib_binary-amd64_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://www.backports.org etch-backports/main Packages (/var/lib/apt/lists/www.backports.org_debian_dists_etch-backports_main_binary-amd64_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://volatile.debian.org etch/volatile/main Packages (/var/lib/apt/lists/volatile.debian.org_debian-volatile_dists_etch_volatile_main_binary-amd64_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://volatile.debian.org etch/volatile/contrib Packages (/var/lib/apt/lists/volatile.debian.org_debian-volatile_dists_etch_volatile_contrib_binary-amd64_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://volatile.debian.org etch/volatile/non-free Packages (/var/lib/apt/lists/volatile.debian.org_debian-volatile_dists_etch_volatile_non-free_binary-amd64_Packages) - stat (2 No such file or directory)
W: You may want to run apt-get update to correct these problems
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

我尝试运行sudo apt-get -f install并得到了一些与统计相关的错误和运行的建议apt-get update。(如果您需要了解更多详细信息,请告诉我)

我尝试了一下sudo apt-get update,得到了几个 404 错误,接下来是这个:

Reading package lists... Done
W: GPG error: http://debian.di.newdream.net etch Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8E4BD8EB613A210F
W: Couldn't stat source package list http://debian.newdream.net etch/main Packages (/var/lib/apt/lists/debian.newdream.net_dists_etch_main_binary-amd64_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://debian.newdream.net etch/non-free Packages (/var/lib/apt/lists/debian.newdream.net_dists_etch_non-free_binary-amd64_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://debian.newdream.net etch/contrib Packages (/var/lib/apt/lists/debian.newdream.net_dists_etch_contrib_binary-amd64_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://www.backports.org etch-backports/main Packages (/var/lib/apt/lists/www.backports.org_debian_dists_etch-backports_main_binary-amd64_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://volatile.debian.org etch/volatile/main Packages (/var/lib/apt/lists/volatile.debian.org_debian-volatile_dists_etch_volatile_main_binary-amd64_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://volatile.debian.org etch/volatile/contrib Packages (/var/lib/apt/lists/volatile.debian.org_debian-volatile_dists_etch_volatile_contrib_binary-amd64_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://volatile.debian.org etch/volatile/non-free Packages (/var/lib/apt/lists/volatile.debian.org_debian-volatile_dists_etch_volatile_non-free_binary-amd64_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://debian.newdream.net etch/main Packages (/var/lib/apt/lists/debian.newdream.net_dists_etch_main_binary-amd64_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://debian.newdream.net etch/non-free Packages (/var/lib/apt/lists/debian.newdream.net_dists_etch_non-free_binary-amd64_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://debian.newdream.net etch/contrib Packages (/var/lib/apt/lists/debian.newdream.net_dists_etch_contrib_binary-amd64_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://www.backports.org etch-backports/main Packages (/var/lib/apt/lists/www.backports.org_debian_dists_etch-backports_main_binary-amd64_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://volatile.debian.org etch/volatile/main Packages (/var/lib/apt/lists/volatile.debian.org_debian-volatile_dists_etch_volatile_main_binary-amd64_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://volatile.debian.org etch/volatile/contrib Packages (/var/lib/apt/lists/volatile.debian.org_debian-volatile_dists_etch_volatile_contrib_binary-amd64_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://volatile.debian.org etch/volatile/non-free Packages (/var/lib/apt/lists/volatile.debian.org_debian-volatile_dists_etch_volatile_non-free_binary-amd64_Packages) - stat (2 No such file or directory)
W: You may want to run apt-get update to correct these problems
E: Some index files failed to download, they have been ignored, or old ones used instead.

我做错了什么吗?如何安装 Mercurial?

答案1

你在跑步蚀刻过时的版本不止一个,而是两个。Etch 已从所有官方镜像中删除。此外,backports.org 已移至 backports.debian.org,而 volatile 已停用。

如果您想要一个最新版本的 mercurial,而又不必自己编译它,我建议您从 etch 升级到 lenny,然后从 lenny 升级到 squeeze。

另外,从您发布的内容中,我注意到了“取决于:mercurial-common (= 1.7.5-1)”,这是来自不稳定的版本。您运行的是哪种混合了 etch 和 sid 的 franken 系统?

答案2

如果您在执行“apt-get update”时收到这些消息,则表示 apt 无法连接或从 sources.list 中的某些存储库中提取。

这可能由多种原因造成,但最可能的原因是存储库正在维护且暂时不可用。

可能想稍后再尝试吗?

相关内容