@[TOC]cuda报错 GPG error the public key is not available: NO_PUBKE
报错详情:
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/arm64 InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
W: Failed to fetch https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/arm64/InRelease The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
W: Some index files failed to download. They have been ignored, or old ones used instead.
网上找了很多方法,包括
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key A4B469963BF863CC
也解决不了问题
最后在gpt4的帮助下,运行如下指令,重置了一些东西,错误成功解决:
前提是确保系统时间是正确的。
1.使用新的方法添加公钥,你可以使用 gpg 和 apt 的组合来添加所需的密钥:
sudo apt-key del A4B469963BF863CC
sudo rm /etc/apt/trusted.gpg.d/*_nvidia_*
sudo gpg --no-default-keyring --keyring /usr/share/keyrings/nvidia-archive-keyring.gpg --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC
2.然后,修改你的NVIDIA CUDA存储库文件,确保它指向新的密钥环:
echo "deb [signed-by=/usr/share/keyrings/nvidia-archive-keyring.gpg] https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/arm64/ /" | sudo tee /etc/apt/sources.list.d/cuda.list
```
3.更新你的软件包列表:
````bash
sudo apt update
```
这将应用你对存储库文件的更改,并在下次更新软件包列表时使用新的密钥环文件进行验证。如果仍然有问题,可能需要检查 CUDA 存储库的 URL 是否正确。
最后完美解决问题。