ubuntu-18.04 - 在 Ubuntu 上进行 apt 更新时出现 GPG 错误 (EXPKEYSIG)

标签 ubuntu-18.04 apt

我试图通过运行更新 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>

以下链接How to solve expired key建议使用 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

真的不知道如何解决这个问题?有什么建议吗?

谢谢

最佳答案

为了解决你的问题:

  1. 删除旧 key

    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 添加 - 分布=$(./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 更新

关于ubuntu-18.04 - 在 Ubuntu 上进行 apt 更新时出现 GPG 错误 (EXPKEYSIG),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68410089/

相关文章:

linux - 列出每个使用特定功能的 linux 程序

java - 无法在 apt 处理器类中初始化 Velocity 引擎

ssl - 不能信任 ubuntu 18.04.2 LTS 中的开发 https 自签名证书

postgresql - postgis 2.3 安装与 postgres 9.6 ubuntu 18.04

Docker 守护程序套接字 : Permission denied (even after usermod)

python-3.x - 在 python3 上安装 pyimagesearch

dependencies - 如何直接从 debian/control 文件安装构建依赖项?

docker - 恢复Docker的CHMOD 666 cmd

ubuntu - 在 apt-get update 上得到 'NOSPLIT'(网络是否需要身份验证?)

linux - 如何使用 YUM 或 Apt 包管理器在 Linux 中创建安装程序包?