[自分用メモ] apt-getで”The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY”と出力される 

AIX、UNIX、Linux

はじめに

自宅にあるOpenMediaVault (Debian) なマシンで apt-get update を実行すると、タイトルのようなエラーが出ていることに気が付きました。

$ sudo apt-get update
Get:1 file:/var/cache/openmediavault/archives  InRelease
Ign:1 file:/var/cache/openmediavault/archives  InRelease
Get:2 file:/var/cache/openmediavault/archives  Release
Ign:4 file:/var/cache/openmediavault/archives  Contents (deb)
Get:5 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:5 file:/var/cache/openmediavault/archives  Contents (deb)
Get:3 file:/var/cache/openmediavault/archives  Packages
Ign:3 file:/var/cache/openmediavault/archives  Packages
Get:4 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:4 file:/var/cache/openmediavault/archives  Contents (deb)
Get:5 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:5 file:/var/cache/openmediavault/archives  Contents (deb)
Get:3 file:/var/cache/openmediavault/archives  Packages
Ign:4 file:/var/cache/openmediavault/archives  Contents (deb)
Get:5 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:3 file:/var/cache/openmediavault/archives  Packages
Get:4 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:4 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:5 file:/var/cache/openmediavault/archives  Contents (deb)
Get:3 file:/var/cache/openmediavault/archives  Packages
Get:4 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:4 file:/var/cache/openmediavault/archives  Contents (deb)
Get:5 file:/var/cache/openmediavault/archives  Contents (deb)                                          
Ign:5 file:/var/cache/openmediavault/archives  Contents (deb)                                          
Hit:6 http://httpredir.debian.org/debian bullseye InRelease                                                                   
Get:7 https://openmediavault.github.io/packages shaitan InRelease [12.8 kB]                                                                       
Hit:8 https://openmediavault-plugin-developers.github.io/packages/debian shaitan InRelease                                                        
Get:13 http://httpredir.debian.org/debian bullseye-backports InRelease [49.0 kB]                                                                  
Get:14 https://ftp.ubuntu-tw.org/mirror/armbian/apt bullseye InRelease [53.3 kB]                                                                  
Get:15 https://download.docker.com/linux/debian bullseye InRelease [43.3 kB]
Err:7 https://openmediavault.github.io/packages shaitan InRelease                              
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7E7A6C592EF35D13 NO_PUBKEY 24863F0C716B980B
Get:16 http://packages.openmediavault.org/public shaitan InRelease [12.8 kB]
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://openmediavault.github.io/packages shaitan InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7E7A6C592EF35D13 NO_PUBKEY 24863F0C716B980B
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://packages.openmediavault.org/public shaitan InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7E7A6C592EF35D13 NO_PUBKEY 24863F0C716B980B
W: Failed to fetch http://packages.openmediavault.org/public/dists/shaitan/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7E7A6C592EF35D13 NO_PUBKEY 24863F0C716B980B
W: Failed to fetch https://openmediavault.github.io/packages/dists/shaitan/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7E7A6C592EF35D13 NO_PUBKEY 24863F0C716B980B
W: Some index files failed to download. They have been ignored, or old ones used instead.

参考にしたところ

なるほど、表示されているキーをaptのキーマネージャーに登録すれば良いのか、ということで実行してみる。

$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 24863F0C716B980B
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.YM0th05R3C/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 24863F0C716B980B
gpg: key 24863F0C716B980B: "OpenMediaVault.org (OpenMediaVault packages archive) <[email protected]>" not changed
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7E7A6C592EF35D13
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.mCG5hTPShJ/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 7E7A6C592EF35D13
gpg: key 7E7A6C592EF35D13: public key "OpenMediaVault.org (OpenMediaVault packages archive) <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1

改めて、apt-get update してみると・・・

$ sudo apt-get update
Get:1 file:/var/cache/openmediavault/archives  InRelease
Ign:1 file:/var/cache/openmediavault/archives  InRelease
Get:2 file:/var/cache/openmediavault/archives  Release
Ign:4 file:/var/cache/openmediavault/archives  Contents (deb)
Get:5 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:5 file:/var/cache/openmediavault/archives  Contents (deb)
Get:3 file:/var/cache/openmediavault/archives  Packages
Ign:3 file:/var/cache/openmediavault/archives  Packages
Get:4 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:4 file:/var/cache/openmediavault/archives  Contents (deb)
Get:5 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:5 file:/var/cache/openmediavault/archives  Contents (deb)
Get:3 file:/var/cache/openmediavault/archives  Packages
Ign:4 file:/var/cache/openmediavault/archives  Contents (deb)
Get:5 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:3 file:/var/cache/openmediavault/archives  Packages
Get:4 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:4 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:5 file:/var/cache/openmediavault/archives  Contents (deb)
Get:3 file:/var/cache/openmediavault/archives  Packages
Get:4 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:4 file:/var/cache/openmediavault/archives  Contents (deb)
Get:5 file:/var/cache/openmediavault/archives  Contents (deb)                                          
Ign:5 file:/var/cache/openmediavault/archives  Contents (deb)                                          
Hit:6 http://httpredir.debian.org/debian bullseye InRelease                                                                   
Get:7 https://openmediavault.github.io/packages shaitan InRelease [12.8 kB]                                                                       
Hit:8 https://openmediavault-plugin-developers.github.io/packages/debian shaitan InRelease                                                        
Get:13 http://httpredir.debian.org/debian bullseye-backports InRelease [49.0 kB]                                                                  
Get:14 https://ftp.ubuntu-tw.org/mirror/armbian/apt bullseye InRelease [53.3 kB]                                                                  
Get:15 https://download.docker.com/linux/debian bullseye InRelease [43.3 kB]
Err:7 https://openmediavault.github.io/packages shaitan InRelease                              
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7E7A6C592EF35D13 NO_PUBKEY 24863F0C716B980B
Get:16 http://packages.openmediavault.org/public shaitan InRelease [12.8 kB]
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://openmediavault.github.io/packages shaitan InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7E7A6C592EF35D13 NO_PUBKEY 24863F0C716B980B
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://packages.openmediavault.org/public shaitan InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7E7A6C592EF35D13 NO_PUBKEY 24863F0C716B980B
W: Failed to fetch http://packages.openmediavault.org/public/dists/shaitan/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7E7A6C592EF35D13 NO_PUBKEY 24863F0C716B980B
W: Failed to fetch https://openmediavault.github.io/packages/dists/shaitan/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7E7A6C592EF35D13 NO_PUBKEY 24863F0C716B980B
W: Some index files failed to download. They have been ignored, or old ones used instead.

変わらず。

なんでだろうなぁと /etc/apt/sources.list.d/openmediavault.list を確認してみたところ、

deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] http://packages.openmediavault.org/public/ shaitan main
deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://openmediavault.github.io/packages/ shaitan main
# deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] http://downloads.sourceforge.net/project/openmediavault/packages/ shaitan main
## This software is not part of OpenMediaVault, but is offered by third-party
## developers as a service to OpenMediaVault users.
deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] http://packages.openmediavault.org/public/ shaitan partner
deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://openmediavault.github.io/packages/ shaitan partner
# deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] http://downloads.sourceforge.net/project/openmediavault/packages/ shaitan partner

まさか openmediavault-archive-keyring.gpg がないとか・・・

$ sudo dpkg -l | grep keyring
[sudo] password for kometch: 
ii  debian-archive-keyring               2021.1.1+deb11u1               all          GnuPG archive keys of the Debian archive

解決策

ああ、インストールされていない。5 -> 6へのアップグレードの際に上手くいかなかったのかなぁということで、手動でkeyringパッケージをインストールしたところ問題なく apt-get update が実行できるようになりました。

$ sudo apt-get install openmediavault-keyring
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  openmediavault-keyring
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 6,036 B of archives.
After this operation, 25.6 kB of additional disk space will be used.
Get:1 http://packages.openmediavault.org/public shaitan/main armhf openmediavault-keyring all 1.0.2-2 [6,036 B]
Fetched 6,036 B in 1s (10.7 kB/s)                 
Selecting previously unselected package openmediavault-keyring.
(Reading database ... 47799 files and directories currently installed.)
Preparing to unpack .../openmediavault-keyring_1.0.2-2_all.deb ...
$ sudo apt-get update
Get:1 file:/var/cache/openmediavault/archives  InRelease
Ign:1 file:/var/cache/openmediavault/archives  InRelease
Get:2 file:/var/cache/openmediavault/archives  Release
Ign:2 file:/var/cache/openmediavault/archives  Release
Get:3 file:/var/cache/openmediavault/archives  Packages
Ign:3 file:/var/cache/openmediavault/archives  Packages
Get:4 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:4 file:/var/cache/openmediavault/archives  Contents (deb)
Get:5 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:5 file:/var/cache/openmediavault/archives  Contents (deb)
Get:3 file:/var/cache/openmediavault/archives  Packages
Ign:3 file:/var/cache/openmediavault/archives  Packages
Get:4 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:4 file:/var/cache/openmediavault/archives  Contents (deb)
Get:5 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:5 file:/var/cache/openmediavault/archives  Contents (deb)
Get:3 file:/var/cache/openmediavault/archives  Packages
Ign:3 file:/var/cache/openmediavault/archives  Packages
Get:4 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:4 file:/var/cache/openmediavault/archives  Contents (deb)
Get:5 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:5 file:/var/cache/openmediavault/archives  Contents (deb)
Get:4 file:/var/cache/openmediavault/archives  Contents (deb)                                                                               [0/564]Ign:4 file:/var/cache/openmediavault/archives  Contents (deb)
Get:5 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:5 file:/var/cache/openmediavault/archives  Contents (deb)
Get:3 file:/var/cache/openmediavault/archives  Packages
Ign:3 file:/var/cache/openmediavault/archives  Packages
Get:4 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:4 file:/var/cache/openmediavault/archives  Contents (deb)
Get:5 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:5 file:/var/cache/openmediavault/archives  Contents (deb)
Get:3 file:/var/cache/openmediavault/archives  Packages
Ign:3 file:/var/cache/openmediavault/archives  Packages
Get:4 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:4 file:/var/cache/openmediavault/archives  Contents (deb)
Get:5 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:5 file:/var/cache/openmediavault/archives  Contents (deb)
Get:3 file:/var/cache/openmediavault/archives  Packages
Hit:6 http://security.debian.org/debian-security bullseye-security InRelease
Get:4 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:4 file:/var/cache/openmediavault/archives  Contents (deb)
Get:5 file:/var/cache/openmediavault/archives  Contents (deb)
Ign:5 file:/var/cache/openmediavault/archives  Contents (deb)
Hit:7 https://openmediavault-plugin-developers.github.io/packages/debian shaitan InRelease
Hit:8 http://httpredir.debian.org/debian bullseye InRelease
Get:9 https://download.docker.com/linux/debian bullseye InRelease [43.3 kB]
Get:10 https://openmediavault.github.io/packages shaitan InRelease [12.8 kB]
Hit:11 http://httpredir.debian.org/debian bullseye-updates InRelease
Hit:12 https://repo.zabbix.com/zabbix-agent2-plugins/1/debian bullseye InRelease
Hit:13 https://repo.zabbix.com/zabbix/6.0/debian bullseye InRelease
Hit:14 http://httpredir.debian.org/debian bullseye-backports InRelease
Get:15 http://packages.openmediavault.org/public shaitan InRelease [12.8 kB]
Get:16 https://ftp.ubuntu-tw.org/mirror/armbian/apt bullseye InRelease [53.3 kB]
Get:17 https://openmediavault.github.io/packages shaitan/main armhf Packages [12.9 kB]
Get:18 http://packages.openmediavault.org/public shaitan/main armhf Packages [12.9 kB]
Fetched 135 kB in 9s (14.3 kB/s)
Reading package lists... Done

kometch@odroidxu4:~$

この辺りも気をつけて確認出来るようにしておきたいですね・・・

この記事を書いた人

kometchtech

うつ病を患いながら、IT業界の末席にいるおっさんエンジニア。科学計算をしたことがないのに、HPC分野にお邪魔している。興味のある分野で学習したことをblogにまとめつつ、うつ病の経過症状のメモも置いておく日々。じつはRouterboard User Group JPの中の人でもある。 Amazon欲しいものリスト / Arm板を恵んでくれる人募集中

kometchtechをフォローする
タイトルとURLをコピーしました