gpg 和 apt-get update 有问题——缺少密钥?

gpg 和 apt-get update 有问题——缺少密钥?

我不知道怎么做,但我设法搞乱了 apt-get。执行中

sudo su
apt-get update

我收到如下错误

W: http://security.debian.org/dists/stretch/updates/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: GPG error: http://security.debian.org stretch/updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9D6D8F6BC857C906 NO_PUBKEY 8B48AD6246925553
W: The repository 'http://security.debian.org stretch/updates InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.

对于存储库:

http://deb.debian.org/debian stretch-updates InRelease
http://deb.debian.org/debian stretch-proposed-updates InRelease
http://deb.debian.org/debian stretch Release

我知道缺少一些键,我尝试使用以下命令创建它们

gpg --keyserver keyring.debian.org --recv-keys 8B48AD6246925553

但作为答复我得到了

gpg: no valid OpenPGP data found.
gpg: Total number processed: 0

另外我还有另一个问题http://deb.debian.org/debian拉伸/主要翻译-en:

E: Failed to fetch http://deb.debian.org/debian/dists/stretch/main/i18n/Translation-en  BZ2_bzread: /var/lib/apt/lists/partial/deb.debian.org_debian_dists_stretch_main_i18n_Translation-en.bz2 Read error (-5: DATA_ERROR_MAGIC)

这似乎与 Zip 格式有关!?不知道我做了什么。

有什么想法/提示如何解决我的两个问题吗?

干杯,克里斯蒂安

答案1

解决这个问题最简单的方法是手动下载包裹debian-archive-keyring并安装它,然后apt update再次运行。您还需要恢复以下权限/etc/apt/trusted.gpg

sudo chmod 444 /etc/apt/trusted.gpg

问题Translations是服务器上有一个坏文件,您对此无能为力。

相关内容