首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Azure Nvidia中的apt-更新给出了公开密钥错误

Azure Nvidia中的apt-更新给出了公开密钥错误
EN

Stack Overflow用户
提问于 2022-04-29 01:06:35
回答 4查看 5.2K关注 0票数 13

我在AZURE上启动了一个NVIDIA,并试图使用sudo apt update进行更新,但给出了错误:

代码语言:javascript
运行
复制
Hit:2 http://azure.archive.ubuntu.com/ubuntu focal InRelease                                                 
Hit:3 http://azure.archive.ubuntu.com/ubuntu focal-updates InRelease                                         
Hit:4 http://azure.archive.ubuntu.com/ubuntu focal-backports InRelease                                   
Hit:5 https://packages.microsoft.com/repos/azure-cli focal InRelease        
Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease            
Err:1 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64  InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
Reading package lists... Done
W: GPG error: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64  InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
E: The repository 'http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64  InRelease' is no longer 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.

要安装我使用sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A4B469963BF863CC的密钥

但这没有造成数据错误。gpg: keyserver receive failed: No data

我可以运行sudo apt-get upgrade,但不能运行更新。如能提供任何帮助,将不胜感激。

尽管已经安装了cuda,但它仍然找不到cuda库,这可能是由于更新。

EN

回答 4

Stack Overflow用户

回答已采纳

发布于 2022-04-29 08:05:48

下面这句话对我有用

代码语言:javascript
运行
复制
apt-key del 7fa2af80
rm /etc/apt/sources.list.d/cuda.list
rm /etc/apt/sources.list.d/nvidia-ml.list
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-keyring_1.0-1_all.deb
dpkg -i cuda-keyring_1.0-1_all.deb

我在docker容器中运行了这些命令,所以在VM中您可能需要添加sudo。

票数 15
EN

Stack Overflow用户

发布于 2022-04-30 21:18:35

此错误是由于Cuda回购键旋转造成的。在Nvidia表单上发布的解决方案不适用于我,https://forums.developer.nvidia.com/t/notice-cuda-linux-repository-key-rotation/212771

以下措施发挥了作用:

代码语言:javascript
运行
复制
apt-key del 7fa2af80
wget https://developer.download.nvidia.com/compute/cuda/repos/$distro/$arch/cuda-keyring_1.0-1_all.deb
dpkg -i cuda-keyring_1.0-1_all.deb

在以下命令中替换$distro/$arch;例如:

  • debian10 10/x86_64
  • debian11 11/x86_64
  • ubuntu1604/x86_64
  • Ubuntu1804/sbsa
  • ubuntu1804/ppc64el
  • ubuntu1804/sbsa
  • ubuntu1804/x86_64
  • Ubuntu2004/sbsa
  • ubuntu2004/sbsa
  • ubuntu2004/x86_64
  • ubuntu2204/sbsa
  • ubuntu2204/x86_64
  • wsl-ubuntu/x86_64

然后

代码语言:javascript
运行
复制
apt-get update

如果在apt-get update之后出现错误,如下所示

代码语言:javascript
运行
复制
root@9c8cceaf7843:/# apt-get update
E: Conflicting values set for option Signed-By regarding source https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /: /usr/share/keyrings/cuda-archive-keyring.gpg != 
E: The list of sources could not be read.

运行以下命令

代码语言:javascript
运行
复制
sed -i '/developer\.download\.nvidia\.com\/compute\/cuda\/repos/d' /etc/apt/sources.list.d/*
sed -i '/developer\.download\.nvidia\.com\/compute\/machine-learning\/repos/d' /etc/apt/sources.list.d/*
apt-get update

这应该能解决这个问题

方法2(不推荐)

或者,您可以手动安装密钥(更改$分发版/$arch)

代码语言:javascript
运行
复制
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/$distro/$arch/3bf863cc.pub

检查发行版和体系结构

迪斯托

代码语言:javascript
运行
复制
uname -v
or
lsb_release -a

架构:

代码语言:javascript
运行
复制
uname -i

参考:

https://forums.developer.nvidia.com/t/notice-cuda-linux-repository-key-rotation/212771

https://github.com/NVIDIA/cuda-repo-management/issues/4

https://forums.developer.nvidia.com/t/updating-the-cuda-linux-gpg-repository-key/212897/8

票数 4
EN

Stack Overflow用户

发布于 2022-05-01 14:12:29

正如其他人所提到的,这个问题是由于库达回购密钥的轮换。上面提到的apt-key方法对我不起作用。我查看了关于nvidia论坛的更多细节,并从用户(olyuninv)那里看到了另一个方法,在apt之前,您必须在Dockerfile中复制下面的命令,如下所示:

代码语言:javascript
运行
复制
COPY ./cuda-keyring_1.0-1_all.deb cuda-keyring_1.0-1_all.deb

RUN rm /etc/apt/sources.list.d/cuda.list
&& rm /etc/apt/sources.list.d/nvidia-ml.list
&& dpkg -i cuda-keyring_1.0-1_all.deb

RUN apt-get update

不要忘记先根据您的操作系统版本从这里.下载密钥

基本上,您必须使用以下命令:

wget https://developer.download.nvidia.com/compute/cuda/repos/$distro/$arch/cuda-keyring_1.0-1_all.deb

(但是必须用您的操作系统版本替换$distro/$arch链接中有更多的细节)

如果有兴趣,可以在这里获得更多有关此nvidia cuda gitlab机票。的详细信息。

参考文献:

1https://forums.developer.nvidia.com/t/invalid-public-key-for-cuda-apt-repository/212901/7

2https://developer.nvidia.com/blog/updating-the-cuda-linux-gpg-repository-key/

3.https://gitlab.com/nvidia/container-images/cuda/-/issues/158

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72051754

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档