我在 make 时遇到错误sudo apt update
➜ ~ sudo apt-get update
Err:1 https://linux-clients.seafile.com/seadrive-deb/focal stable InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2B844307BE7E9E8C
Err:14 http://ppa.launchpad.net/mc3man/xerus-media/ubuntu focal Release
404 Not Found [IP: 91.189.95.85 80]
Err:15 http://ppa.launchpad.net/pypa/ppa/ubuntu focal Release
404 Not Found [IP: 91.189.95.85 80]
Err:8 https://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
通过 80 端口运行-没有数据:
➜ ~ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 2B844307BE7E9E8C
Executing: /tmp/apt-key-gpghome.dThi8vDgCQ/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 2B844307BE7E9E8C
gpg: keyserver receive failed: No data
我还能做什么来解决这个问题?
!!!解决了,谢谢!!!
答案1
NVIDIA 似乎已于 2022 年 4 月 27 日更新了其签名密钥。您可以关注这些指示使用新的版本来更新您的系统。
推荐的方法是使用辅助包自动安装密钥。要安装辅助包(和密钥),请运行以下命令:
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_1.0-1_all.deb
或者,您可以使用以下命令手动安装密钥(不推荐的方法):
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub
答案2
apt-key 现在似乎已被弃用,我已经创建了一个脚本,可以检测并获取丢失的密钥,你可以获取它这里。
#!/bin/sh -e
tmp="$(mktemp)"
sudo apt-get update 2>&1 | sed -En 's/.*NO_PUBKEY ([[:xdigit:]]+).*/\1/p' | sort -u > "${tmp}"
cat "${tmp}" | xargs sudo gpg --keyserver "hkps://keyserver.ubuntu.com:443" --recv-keys # to /usr/share/keyrings/*
cat "${tmp}" | xargs -L 1 sh -c 'sudo gpg --yes --output "/etc/apt/trusted.gpg.d/$1.gpg" --export "$1"' sh # to /etc/apt/trusted.gpg.d/*
rm "${tmp}"
答案3
除了带有 Nvidia 说明的其他答案之外,请运行以下命令来修复您的 seafile 存储库。
如果第一个命令解决了问题,则可以跳过第二个命令。
sudo wget https://linux-clients.seafile.com/seafile.asc -O /usr/share/keyrings/seafile-keyring.asc
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/seafile-keyring.asc] https://linux-clients.seafile.com/seafile-deb/$(lsb_release -cs)/ stable main" | sudo tee /etc/apt/sources.list.d/seafile.list > /dev/null
答案4
赶紧跑
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC
这将从密钥服务器存储库下载丢失的密钥。