23

I get errors while 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

Runing though 80 port - no data:

➜  ~ 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

what else can I do to solve this problem?

!!!solved Thanks!!!

  • Did you already run sudo wget https://linux-clients.seafile.com/seafile.asc -O /usr/share/keyrings/seafile-keyring.asc and is the repository listed as deb [arch=amd64 signed-by=/usr/share/keyrings/seafile-keyring.asc] https://linux-clients.seafile.com/seafile-deb/focal/ stable main' in your /etc/apt/sources.list.d/seafile.list file? – mchid May 11 '22 at 19:00
  • Also, do you get the same error for Nvidia? – mchid May 11 '22 at 19:01
  • sudo wget https://linux-clients.seafile.com/seafile.asc -O /usr/share/keyrings/seafile-keyring.asc solve problem with NO_PUBKEY 2B844307BE7E9E8C – Yuriy Simonov May 12 '22 at 07:24
  • Looks like there are no this row. Should I add one?
    ➜  ~ cat /etc/apt/sources.list.d/seafile.list
    deb http://deb.seadrive.org stretch main
    
    – Yuriy Simonov May 12 '22 at 07:25
  • If the first command fixed the problem, you can skip the second command and leave the line as it is. Answer provided below. Don't forget to upvote answers if they work for you. – mchid May 12 '22 at 07:53

4 Answers4

22

Looks like NVIDIA has updated its signing keys as of April 27, 2022. You can follow these instructions to update your system with the new ones.


The recommended method is to use a helper package to automatically install the keys. To install the helper package (and the keys), run the following commands:

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

Alternatively, you can install the key manually by using the following commands (not the recommended method):

sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub
mchid
  • 43,546
  • 8
  • 97
  • 150
  • it's help with Nvidia public key! Thanks!!! – Yuriy Simonov May 12 '22 at 07:35
  • I needed to run these as well, but finally worked! 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/* – alan.elkin Nov 28 '22 at 15:56
8

apt-key now seems to be deprecated, I have created a script that will detect and get the missing keys, you can get it here.

#!/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}"
2

In addition to the other answer with Nvidia instructions, run the following commands to fix your seafile repository.

If the first command fixes the problem, you can skip the second command.

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

The official instructions can be found here.

mchid
  • 43,546
  • 8
  • 97
  • 150
  • The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC – Bengt Oct 14 '23 at 22:25
  • 1
    @Bengt I updated the second command to reflect the current instructions provided by seafile. I think that the only meaningful difference is that it uses $(lsb_release -cs) instead of focal but if you're not using 20.04, then you would need to change focal to your current Ubuntu release and that's what this change does for you. Therefore, this should fix the issue, particularly if you're not running focal. – mchid Oct 17 '23 at 18:13
0

Just run

$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC

This will download the missing key from the keyserver repository.