错误:找不到存档密钥环

错误:找不到存档密钥环

我正在尝试将 Debian Lenny 升级到 Squeeze。我在 sources.list 中将 lenny 一词替换为 squeeze,然后运行

apt-get clean
apt-get update
apt-get dist-upgrade

但过了一会儿,我收到这个错误

Preconfiguring packages ...
Setting up debian-archive-keyring (2010.08.28) ...
ERROR: Can't find the archive-keyring
Is the ubuntu-keyring package installed?
dpkg: error processing debian-archive-keyring (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 debian-archive-keyring
E: Sub-process /usr/bin/dpkg returned an error code (1)

所以我尝试安装apt-get -f install debian-archive-keyring,但出现了同样的错误。然后我尝试安装apt-get -f install ubuntu-keyring,但出现了以下错误:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package ubuntu-keyring is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package ubuntu-keyring has no installation candidate

也许我的 sources.list 中有错误的来源:

deb    ftp://mirror.hetzner.de/debian/packages  squeeze          main contrib non-free
deb    ftp://mirror.hetzner.de/debian/security  squeeze/updates  main contrib non-free

deb     http://ftp.de.debian.org/debian/  squeeze  main non-free contrib
deb-src http://ftp.de.debian.org/debian/  squeeze  main non-free contrib

deb     http://security.debian.org/  squeeze/updates  main contrib non-free
deb-src http://security.debian.org/  squeeze/updates  main contrib non-free

希望有人能帮助我,

谢谢,tux


谢谢你们两位的回答。@mailq 我也想知道为什么 Ubuntu 软件包缺失/错误。我在我的服务器上运行 Debian Lenny,并尝试升级到 squeeze。因此,我在我的 中替换了 中的单词lennysqueezesources.list就是结果:一些 Ubuntu 错误(???)。第一个来源是我的提供商的本地来源,第二个来源,正如 Gilles 所说,是 Debian 的官方(但速度较慢)来源。

@Gilles 以下是命令的输出:

# lsb_release -irc
Distributor ID: Ubuntu
Release:    10.04
Codename:   lucid

# type apt-key
apt-key is /usr/bin/apt-key

# dpkg -s apt
Package: apt
Status: install ok installed
Priority: important
Section: admin
Installed-Size: 5488
Maintainer: Ubuntu Core Developers <[email protected]>
Architecture: amd64
Version: 0.7.25.3ubuntu7
Replaces: libapt-pkg-dev (<< 0.3.7), libapt-pkg-doc (<< 0.3.7)
Provides: libapt-pkg-libc6.10-6-4.8
Depends: libc6 (>= 2.8), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.4.0)
Recommends: ubuntu-keyring
Suggests: aptitude | synaptic | wajig, dpkg-dev, apt-doc, bzip2, lzma, python-apt
Conffiles:
 /etc/apt/apt.conf.d/01autoremove 6154750d39a78704b5bbf6fafd65ada7
 /etc/apt/apt.conf.d/01ubuntu 078b96538a377743bee0f554eb5b2fc6
 /etc/logrotate.d/apt 179f2ed4f85cbaca12fa3d69c2a4a1c3
 /etc/cron.daily/apt 3528ddf873535d4c268d83e73e85dc79
Description: Advanced front-end for dpkg
 This is Debian's next generation front-end for the dpkg package manager.
 It provides the apt-get utility and APT dselect method that provides a
 simpler, safer way to install and upgrade packages.
 .
 APT features complete installation ordering, multiple source capability
 and several other unique features, see the Users Guide in apt-doc.
Original-Maintainer: APT Development Team <[email protected]>

我只想升级到 Debian Squeeze,我不知道 Ubuntu 是怎么回事。全新安装不是一个好主意,因为我正在生产中运行此服务器,不想停机。

那么,还有其他想法吗?

谢谢,tux

答案1

消息“ubuntu-keyring 软件包是否已安装?”来自apt-key管理 APT 密钥环的程序。您显然拥有apt-key来自 Ubuntu 的程序,而不是来自 Debian 的程序。由于该apt-key程序是软件包的一部分,因此这里一定出了问题。您确定这台机器安装了 Debian,而不是 Ubuntu 吗?检查(如果存在)apt的输出或软件包的版本。还要检查您的程序来自哪里:,。lsb_release -irclsb_releasebase-filesapt-keytype apt-keydpkg -s apt

如果您使用的是 Ubuntu,则无法升级到 Debian(反之亦然)。这两个发行版使用相同的软件包格式,并且有许多共同的软件包,但差异很大,因此需要付出一些努力才能支持这种跨发行版升级,而且几乎没有人愿意付出这样的努力。因此,如果您使用的是较旧的 Ubuntu 版本(可能很耐用?),请保留它,升级到新的 Ubuntu,或者重新安装。

答案2

Ubuntu?!ubuntu-keyrings 与 Debian 有什么关系?

删除 sources.list 中的前两行。或者其他四行。但不要列出两次。

相关内容