The following signatures couldn‘t be verified because the public key is not available: NO_PUBKEY F60

(base) root@sh:/home/sh/cuda-driver# sudo apt-get update
Get:1 file:/var/cuda-repo-10-2-local-10.2.89-440.33.01  InRelease
Ign:1 file:/var/cuda-repo-10-2-local-10.2.89-440.33.01  InRelease
Get:2 file:/var/cuda-repo-10-2-local-10.2.89-440.33.01  Release [574 B]
Get:2 file:/var/cuda-repo-10-2-local-10.2.89-440.33.01  Release [574 B]
Err:3 file:/var/cuda-repo-10-2-local-10.2.89-440.33.01  Release.gpg
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F60F4B3D7FA2AF80
Hit:5 http://security.ubuntu.com/ubuntu jammy-security InRelease         
Hit:6 http://archive.ubuntu.com/ubuntu jammy InRelease               
Hit:4 https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2204/x86_64  InRelease
Hit:7 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:8 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file:/var/cuda-repo-10-2-local-10.2.89-440.33.01  Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F60F4B3D7FA2AF80
W: Failed to fetch file:/var/cuda-repo-10-2-local-10.2.89-440.33.01/Release.gpg  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F60F4B3D7FA2AF80
W: Some index files failed to download. They have been ignored, or old ones used instead.

本地CUDA仓库(file:/var/cuda-repo-10-2-local-10.2.89-440.33.01)的APT源,但是该源的GPG公钥(F60F4B3D7FA2AF80)没有被添加到APT的信任密钥中。由于直接下载公钥的尝试失败了,我们可以采取另一种方法来解决这个问题。

解决步骤

方法1: 移除或禁用本地CUDA仓库

如果你已经成功从其他来源安装了CUDA,并且不再需要这个本地仓库,你可以考虑移除或禁用它。

  1. 查找仓库定义:首先,找到定义该本地仓库的列表文件。这些文件通常位于/etc/apt/sources.list/etc/apt/sources.list.d/目录下。你可以通过搜索包含cuda-repo-10-2-local的文件来定位它。

    grep -r "cuda-repo-10-2-local" /etc/apt/sources.list /etc/apt/sources.list.d/
    
  2. 注释掉或删除仓库条目:一旦找到包含本地CUDA仓库的文件,你可以使用文本编辑器(如nanovi)来注释掉相关行(在行首添加#)或直接删除这些行。

    例如,如果发现在/etc/apt/sources.list.d/cuda.list文件中有关于本地仓库的定义,你可以通过以下命令编辑该文件:

    sudo nano /etc/apt/sources.list.d/cuda.list
    
  3. 更新APT索引:编辑完成后,运行以下命令更新APT的软件包索引:

    sudo apt-get update
    
方法2: 手动添加GPG公钥

如果你仍然需要这个本地CUDA仓库,你可以尝试手动添加缺失的公钥。

  1. 手动下载公钥:由于自动下载失败,你可以尝试从NVIDIA官方网站或其他可靠来源手动下载GPG公钥文件。如果官方网站提供了密钥下载链接,使用浏览器或wgetcurl等工具下载密钥文件到本地。

  2. 导入公钥到APT:下载公钥文件后,使用apt-key命令或将密钥文件放入/usr/share/keyrings/并适当更新APT源配置来导入公钥。由于apt-key已弃用,推荐的方法是将公钥文件放入/usr/share/keyrings/,但这需要你的APT源配置中有signed-by指向该密钥文件。

如果无法直接从NVIDIA下载公钥,且没有其他方式解决,可能需要联系NVIDIA客服或访问NVIDIA开发者论坛,寻找是否有其他用户遇到类似问题并找到了解决方案。

综上所述,推荐的首要步骤是尝试移除或禁用不再需要的本地CUDA仓库,以简化系统配置并避免未来的更新问题。如果确实需要该仓库,那么手动添加公钥是必要的步骤,但请确保公钥来源的安全性和可靠性。

参考地址:
https://developer.nvidia.com/blog/updating-the-cuda-linux-gpg-repository-key/

  • 8
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

MonkeyKing.sun

对你有帮助的话,可以打赏

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值