0

我正在尝试sudo apt-get update在鹦鹉操作系统中做一个,但我得到的只是这个错误

Err:1 http://your.repo.domain/repository JollyRoger InRelease
  Could not resolve 'your.repo.domain'
Ign:2 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                 
Hit:3 http://dl.google.com/linux/chrome/deb stable Release                                                                                   
Hit:4 http://deb.playonlinux.com wheezy InRelease                                            
Get:5 http://mirrordirector.archive.parrotsec.org/parrot parrot InRelease [14.6 kB]          
Err:5 http://mirrordirector.archive.parrotsec.org/parrot parrot InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ED05F7B2EC3C9224
Reading package lists... Done
W: GPG error: http://mirrordirector.archive.parrotsec.org/parrot parrot InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ED05F7B2EC3C9224
E: The repository 'http://mirrordirector.archive.parrotsec.org/parrot parrot InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

我怎样才能永久修复它?

4

2 回答 2

3

apt 打包系统具有一组受信任的密钥,这些密钥确定一个包是否可以被认证并因此被信任安装在系统上。有时系统没有所需的所有密钥并遇到此问题。幸运的是,有一个快速修复。每个被列为缺失的密钥都需要添加到 apt 密钥管理器中,以便它可以对包进行身份验证。

查看上面的错误,apt 告诉我们缺少以下键:

NO_PUBKEY ED05F7B2EC3C9224

要添加这些密钥,请运行以下命令:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ED05F7B2EC3C9224

应该执行非常相似的事情

执行: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.QTeppiINUh --no-auto-check-trustdb --trust-model always --keyring / etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5 gpg: 从 hkp 服务器 keyserver.ubuntu.com 请求密钥 437D05B5 gpg: key 437D05B5:公钥“Ubuntu存档自动签名密钥”导入gpg:处理总数:1 gpg:导入:1

瞧!您应该能够运行更新命令

于 2018-04-18T22:36:05.923 回答
1

编辑 /etc/resolv.conf。在终端窗口中运行

sudo nano /etc/resolv.conf

注释掉所有其他“名称服务器”#

并添加行

nameserver 8.8.8.8

并保存。按 ctr + x 然后按字母 'y' 并再次按 Enter,

然后做

ping www.google.com

如果成功,则运行以下命令

sudo apt-get --download-only --reinstall install resolvconf
sudo dpkg --purge --force-depends resolvconf
sudo apt-get install resolvconf

祝你好运!它对我有用。

PS 以 root 身份登录时不要这样做

于 2019-03-05T08:20:28.240 回答