在Ubuntu上运行apt update时出现GPG错误(EXPKEYSIG)。

4

我尝试在Ubuntu上运行以下命令更新apt软件源:

$sudo apt update

我遇到了以下错误:

W: An error occurred during the signature verification.
The repository is not updated and the previous index files will be used.
GPG error: https://nvidia.github.io/nvidia-container-runtime/experimental/ubuntu18.04/amd64 
InRelease: The following signatures were invalid: EXPKEYSIG 6ED91CA3AC1160CD NVIDIA CORPORATION (Open Source Projects) <cudatools@nvidia.com>
W: Failed to fetch https://nvidia.github.io/nvidia-container-runtime/experimental/ubuntu18.04/amd64/InRelease 
The following signatures were invalid: EXPKEYSIG 6ED91CA3AC1160CD NVIDIA CORPORATION (Open Source Projects) <cudatools@nvidia.com>

我在谷歌搜索了这个错误,一些博客建议运行:
$sudo apt-key list

我这样做了并获得了:

pub   rsa4096 2016-06-24 [SC]
      AE09 FE4B BD22 3A84 B2CC  FCE3 F60F 4B3D 7FA2 AF80
uid           [ unknown] cudatools <cudatools@nvidia.com>

pub   rsa4096 2017-09-28 [SCE]
      C95B 321B 61E8 8C18 09C4  F759 DDCA E044 F796 ECB0
uid           [ unknown] NVIDIA CORPORATION (Open Source Projects) <cudatools@nvidia.com>

以下链接如何解决密钥过期问题建议使用EXPKEYSIG运行以下命令,但我收到了以下错误提示:
$ sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 6ED91CA3AC1160CD
Executing: /tmp/apt-key-gpghome.A0899nj0Vo/gpg.1.sh --keyserver keys.gnupg.net --recv-keys 6ED91CA3AC1160CD
gpg: keyserver receive failed: No name

不确定如何解决这个问题?有什么建议吗?

谢谢

2个回答

3
为解决你的问题:
1. 删除旧的密钥: sudo apt-key del 6ED91CA3AC1160CD
2. 删除存储库信息: sudo rm /etc/apt/sources.list.d/nvidia-container-runtime.list
3. 按此处所写重新初始化存储库:https://nvidia.github.io/nvidia-container-runtime/ curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey |
sudo apt-key add - distribution=$(. /etc/os-release;echo $ID$VERSION_ID) curl -s -L https://nvidia.github.io/nvidia-container-runtime/$distribution/nvidia-container-runtime.list |
sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list sudo apt-get update

-1

解决此问题的方法:

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接