Skip to content

Instantly share code, notes, and snippets.

@hoangdh
Created May 5, 2023 06:50
Show Gist options
  • Save hoangdh/3f75e500176f652162f00c4b7854d176 to your computer and use it in GitHub Desktop.
Save hoangdh/3f75e500176f652162f00c4b7854d176 to your computer and use it in GitHub Desktop.

When run apt update,

root@hadoop123:~# apt-get update
Get:5 https://repo.saltproject.io/py3/ubuntu/20.04/amd64/archive/3005 focal InRelease [2125 B]
Err:5 https://repo.saltproject.io/py3/ubuntu/20.04/amd64/archive/3005 focal InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E08A149DE57BFBE
Reading package lists... Done
W: GPG error: https://repo.saltproject.io/py3/ubuntu/20.04/amd64/archive/3005 focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E08A149DE57BFBE
E: The repository 'https://repo.saltproject.io/py3/ubuntu/20.04/amd64/archive/3005 focal 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.
root@hadoop123:~# sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E08A149DE57BFBE
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.LJUVq0TIDD/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 0E08A149DE57BFBE
gpg: key 0E08A149DE57BFBE: "SaltStack Packaging Team <packaging@saltstack.com>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

Solution:

apt-get clean  
cd /var/lib/apt  
mv lists lists.old  
mkdir -p lists/partial  
apt-get clean  
apt-get update 

Ref: https://askubuntu.com/a/249461

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment