Azure Nvidia 中的 apt-update 给出公钥错误
apt-update in Azure Nvidia gives publickey error
我在 AZURE 上启动了 NVIDIA VM 并尝试使用
sudo apt update
但给出错误:
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 库,这可能是由于更新。
我找到了解决方案。由于今天发生了 NVidia GPG 密钥轮换,因此发生了此错误。所有的细节都是provdhttps://developer.nvidia.com/blog/updating-the-cuda-linux-gpg-repository-key/
以下对我有用
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。
错误是由于 Cuda 存储库密钥轮换引起的。
Nvidia 表单上发布的解决方案对我不起作用 https://forums.developer.nvidia.com/t/notice-cuda-linux-repository-key-rotation/212771
以下有效:
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/x86_64
- debian11/x86_64
- ubuntu1604/x86_64
- ubuntu1804/cross-linux-sbsa
- ubuntu1804/ppc64el
- ubuntu1804/sbsa
- ubuntu1804/x86_64
- ubuntu2004/cross-linux-sbsa
- ubuntu2004/sbsa
- ubuntu2004/x86_64
- ubuntu2204/sbsa
- ubuntu2204/x86_64
- wsl-ubuntu/x86_64
然后
apt-get update
如果在apt-get update
后出现如下错误
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.
运行以下
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
这应该可以解决问题
方法二(不推荐)
或者,您可以手动安装密钥(更改 $distro/$arch)
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/$distro/$arch/3bf863cc.pub
检查您的发行版和架构
迪斯托
uname -v
or
lsb_release -a
架构:
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
正如其他人所提到的,此问题是由于 Cuda 存储库密钥轮换引起的。
apt-key
上面提到的方法对我不起作用。
我在 nvidia forum 上查看了更多详细信息,并从用户 (olyuninv) 那里遇到了另一种方法,其中 你必须在 apt-get 更新之前在 Dockerfile 中复制以下命令如下:
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
不要忘记先根据您的 OS 版本从 here 下载密钥。
您基本上必须使用以下命令:
wget https://developer.download.nvidia.com/compute/cuda/repos/$distro/$arch/cuda-keyring_1.0-1_all.deb
(但必须将 $distro/$arch 替换为您的 OS 版本,link 中有更多详细信息)
如果有兴趣,可以在此处获得更多详细信息 nvidia cuda gitlab ticket.
参考文献:
1: https://forums.developer.nvidia.com/t/invalid-public-key-for-cuda-apt-repository/212901/7
2: https://developer.nvidia.com/blog/updating-the-cuda-linux-gpg-repository-key/
3: https://gitlab.com/nvidia/container-images/cuda/-/issues/158
我在 AZURE 上启动了 NVIDIA VM 并尝试使用
sudo apt update
但给出错误:
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 库,这可能是由于更新。
我找到了解决方案。由于今天发生了 NVidia GPG 密钥轮换,因此发生了此错误。所有的细节都是provdhttps://developer.nvidia.com/blog/updating-the-cuda-linux-gpg-repository-key/
以下对我有用
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。
错误是由于 Cuda 存储库密钥轮换引起的。 Nvidia 表单上发布的解决方案对我不起作用 https://forums.developer.nvidia.com/t/notice-cuda-linux-repository-key-rotation/212771
以下有效:
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/x86_64
- debian11/x86_64
- ubuntu1604/x86_64
- ubuntu1804/cross-linux-sbsa
- ubuntu1804/ppc64el
- ubuntu1804/sbsa
- ubuntu1804/x86_64
- ubuntu2004/cross-linux-sbsa
- ubuntu2004/sbsa
- ubuntu2004/x86_64
- ubuntu2204/sbsa
- ubuntu2204/x86_64
- wsl-ubuntu/x86_64
然后
apt-get update
如果在apt-get update
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.
运行以下
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
这应该可以解决问题
方法二(不推荐)
或者,您可以手动安装密钥(更改 $distro/$arch)
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/$distro/$arch/3bf863cc.pub
检查您的发行版和架构
迪斯托
uname -v
or
lsb_release -a
架构:
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
正如其他人所提到的,此问题是由于 Cuda 存储库密钥轮换引起的。
apt-key
上面提到的方法对我不起作用。
我在 nvidia forum 上查看了更多详细信息,并从用户 (olyuninv) 那里遇到了另一种方法,其中 你必须在 apt-get 更新之前在 Dockerfile 中复制以下命令如下:
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
不要忘记先根据您的 OS 版本从 here 下载密钥。
您基本上必须使用以下命令:
wget https://developer.download.nvidia.com/compute/cuda/repos/$distro/$arch/cuda-keyring_1.0-1_all.deb
(但必须将 $distro/$arch 替换为您的 OS 版本,link 中有更多详细信息)
如果有兴趣,可以在此处获得更多详细信息 nvidia cuda gitlab ticket.
参考文献:
1: https://forums.developer.nvidia.com/t/invalid-public-key-for-cuda-apt-repository/212901/7
2: https://developer.nvidia.com/blog/updating-the-cuda-linux-gpg-repository-key/
3: https://gitlab.com/nvidia/container-images/cuda/-/issues/158