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!!!

5
  • 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, 2022 at 19:00
  • Also, do you get the same error for Nvidia?
    – mchid
    May 11, 2022 at 19:01
  • sudo wget linux-clients.seafile.com/seafile.asc -O /usr/share/keyrings/seafile-keyring.asc solve problem with NO_PUBKEY 2B844307BE7E9E8C May 12, 2022 at 7:24
  • Looks like there are no this row. Should I add one? ``` ➜ ~ cat /etc/apt/sources.list.d/seafile.list deb deb.seadrive.org stretch main ``` May 12, 2022 at 7: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, 2022 at 7:53

4 Answers 4

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
2
  • it's help with Nvidia public key! Thanks!!! May 12, 2022 at 7: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, 2022 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}"
1
  • your solution worked better for me. Thank you!
    – Madeyra
    Jul 3, 2023 at 13:59
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.

2
  • The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
    – Bengt
    Oct 14, 2023 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, 2023 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.

2
  • 1
    I tried it from the very beginning. It didn't work( May 12, 2022 at 23:13
  • Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
    – Bengt
    Oct 14, 2023 at 22:23

Not the answer you're looking for? Browse other questions tagged .