Fix: NO_PUBKEY error when installing ookla/speedtest-cli on Debian 11

Fix: NO_PUBKEY error when installing ookla/speedtest-cli on Debian 11

You’re here probably because you tried to use install the official Ookla Speedtest client in Linux, and failed. When you do an apt update you will be presented with the following error:

W: GPG error: https://packagecloud.io/ookla/speedtest-cli/debian bullseye InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8E61C2AB9A6D1557
E: The repository 'https://packagecloud.io/ookla/speedtest-cli/debian bullseye InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.

This happens because, unfortunately, the installation script did not put the public cert that is used to verify the signature of the repository at the correct place, when you’re running Debian Bullseye.

To fix this issue, first create an empty folder (if it isn’t already there), and make sure it has read and execute access for everyone and also write access for the owner (aka 0755):

mkdir -p /etc/apt/keyrings
chmod 755 /etc/apt/keyrings

Then add the GPG public key to the newly-created folder:

curl -fsSL https://packagecloud.io/ookla/speedtest-cli/gpgkey | gpg --dearmor > /etc/apt/keyrings/ookla_speedtest-cli-archive-keyring.gpg

Note that /etc/apt/keyrings/ookla_speedtest-cli-archive-keyring.gpg is actually specified in the repository file, /etc/apt/sources.list.d/ookla_speedtest-cli.list. If you have saved the .gpg file in a different name, be sure to also modify the references in the .list file.


Leave a Reply

0