我试图通过运行更新 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
真的不知道如何解决这个问题?有什么建议吗?
谢谢
最佳答案
为了解决你的问题:
删除旧 key
sudo apt-key del 6ED91CA3AC1160CD
删除仓库信息:
sudo rm/etc/apt/sources.list.d/nvidia-container-runtime.list
重新初始化存储库,如此处所写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/