I get the following error when doing an update. How do I fix this ?
sudo apt-get update:
W: GPG error: file:/var/cuda-repo-ubuntu2204-12-1-local InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 29D5D019FDA658E8
E: The repository 'file:/var/cuda-repo-ubuntu2204-12-1-local InRelease' is not 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.
As the answers provided by others did not fix the issue, I provide here the answer to my own problem in case others have it also:
- Go to Nvidia website and do the deb local install. They seem to have updated the keys
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pinsudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda-repo-ubuntu2204-12-1-local_12.1.1-530.30.02-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2204-12-1-local_12.1.1-530.30.02-1_amd64.deb
sudo cp /var/cuda-repo-ubuntu2204-12-1-local/cuda-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cuda
sources.list. Many are incompatible and others are just invalid. Remove the unofficial sources you added and try again. Adding sources fundamentally changes your system and adding incompatible sources or sources from a different distribution is a fast track to break things. I'd get rid of all of these unofficial sources. Then you should be able to runsudo apt updateandsudo apt upgrade. If that still doesn't work, you'll want to uninstall all of the software installed from bad sources. You may need to reinstall the OS if things are too badly broken. – Nmath Apr 20 '23 at 17:21Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)). Executing: /tmp/apt-key-gpghome.XNz4dw8Vm5/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 29D5D019FDA658E8 gpg: keyserver receive failed: No data```– Gregor von Laszewski Apr 28 '23 at 15:10
– Gregor von Laszewski May 22 '23 at 10:56wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pinsudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600wget https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda-repo-ubuntu2204-12-1-local_12.1.1-530.30.02-1_amd64.debsudo dpkg -i cuda-repo-ubuntu2204-12-1-local_12.1.1-530.30.02-1_amd64.debsudo cp /var/cuda-repo-ubuntu2204-12-1-local/cuda-*-keyring.gpg /usr/share/keyrings/sudo apt-get updatesudo apt-get -y install cuda