/etc/apt/trusted.gpgキーリングを正しく再構築できません。
$ Sudo rm /etc/apt/trusted.gpg
rm: remove regular file ‘/etc/apt/trusted.gpg’? y
$ Sudo apt-key update 2>&1 | egrep "gpg:.*(invalid|failed)"
gpg: [don't know]: invalid packet (ctb=01)
gpg: keydb_get_keyblock failed: eof
gpg: [don't know]: invalid packet (ctb=01)
gpg: keydb_get_keyblock failed: eof
gpg: [don't know]: invalid packet (ctb=01)
gpg: keydb_get_keyblock failed: eof
gpg: [don't know]: invalid packet (ctb=01)
gpg: keydb_get_keyblock failed: eof
$ apt-key list >/dev/null
gpg: [don't know]: invalid packet (ctb=01)
gpg: keydb_search_next failed: invalid packet
編集1:このpbを見つけました。 /etc/apt/trusted.gpg.d/
のキーリングに関連していたため、add-apt-repository
を使用してそれらを再作成しました。
$ Sudo mv /etc/apt/trusted.gpg.d /etc/apt/trusted.gpg.d.BACKUP
$ Sudo mkdir /etc/apt/trusted.gpg.d
$ time awk -F / '/^deb .*ppa.launchpad.net/{print "Sudo add-apt-repository -y ppa:"$4"/"$5}' /etc/apt/sources.list.d/*.list | sh -x
+ Sudo add-apt-repository -y ppa:aims/sagemath
gpg: keyring `/tmp/tmpv9cab2oz/secring.gpg' created
gpg: keyring `/tmp/tmpv9cab2oz/pubring.gpg' created
gpg: requesting key BE796FF2 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpv9cab2oz/trustdb.gpg: trustdb created
gpg: key BE796FF2: public key "Launchpad PPA for AIMS" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
+ Sudo add-apt-repository -y ppa:apandada1/brightness-controller
gpg: keyring `/tmp/tmp74ndc3fv/secring.gpg' created
gpg: keyring `/tmp/tmp74ndc3fv/pubring.gpg' created
gpg: requesting key A7803E3B from hkp server keyserver.ubuntu.com
gpg: /tmp/tmp74ndc3fv/trustdb.gpg: trustdb created
gpg: key A7803E3B: public key "Launchpad PPA for Archisman Panigrahi" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
...
gpg: /tmp/tmp49wcgvjj/trustdb.gpg: trustdb created
gpg: key EEAD66BD: public key "Launchpad PPA for Xu Zhen" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
real 6m20.794s
user 5m49.528s
sys 0m17.888s
$ apt-key list >/dev/null
gpg: keyblock resource `/etc/apt/trusted.gpg.d/notepadqq-team-notepadqq.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/nowrep-qupzilla.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/octave-stable.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/openlp-core-release.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/otto-kesselgulasch-gimp.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/pinta-maintainers-pinta-stable.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/pmjdebruijn-gnoduino-release.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/privoox-privoox.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/pypy-ppa.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/rvm-smplayer.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/sbates-ppa.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/skunk-pepper-flash.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/smathot-cogscinl.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/stebbins-handbrake-releases.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/stefanobalocco-multimedia.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/team-xbmc-ppa.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/timchen119-bluez5-trusty.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/ubuntu-mate-dev-ppa.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/ubuntu-mate-dev-trusty-mate.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/ubuntu-toolchain-r-test.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/ufleisch-kid3.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/unit193-inxi.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/webupd8team-tor-browser.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/webupd8team-y-ppa-manager.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/wseverin-ppa.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/xuzhen666-gnome-mpv.gpg': resource limit
少し掘り下げた後、GnuPG v1(Ubuntu Trustの依存関係APTパケット)は40を超えるキーリングを処理できない、つまり、/etc/apt/trusted.gpg.d/
で39を超えるキーリングを処理できないことがわかりました(これによると: https://askubuntu.com/a/508337/426176 そしてそれ: https://www.mail-archive.com/gnupg-users@gnupg。 org/msg23302.html )
編集2:/etc/apt/trusted.gpg.d/
の重複したキーを10個削除しました:
$ Sudo fdupes -rnASd /etc/apt/trusted.gpg.d
[1] /etc/apt/trusted.gpg.d/guardianproject-fdroidserver.gpg
[2] /etc/apt/trusted.gpg.d/guardianproject-ppa.gpg
Set 1 of 6, preserve files [1 - 2, all] (916 bytes each): 2
[-] /etc/apt/trusted.gpg.d/guardianproject-fdroidserver.gpg
[+] /etc/apt/trusted.gpg.d/guardianproject-ppa.gpg
[1] /etc/apt/trusted.gpg.d/jonathonf-ffmpeg-3.gpg
[2] /etc/apt/trusted.gpg.d/jonathonf-ffmpeg-4.gpg
[3] /etc/apt/trusted.gpg.d/jonathonf-texlive.gpg
[4] /etc/apt/trusted.gpg.d/jonathonf-vim.gpg
[5] /etc/apt/trusted.gpg.d/jonathonf-vlc.gpg
Set 2 of 6, preserve files [1 - 5, all] (1135 bytes each): 2
[-] /etc/apt/trusted.gpg.d/jonathonf-ffmpeg-3.gpg
[+] /etc/apt/trusted.gpg.d/jonathonf-ffmpeg-4.gpg
[-] /etc/apt/trusted.gpg.d/jonathonf-texlive.gpg
[-] /etc/apt/trusted.gpg.d/jonathonf-vim.gpg
[-] /etc/apt/trusted.gpg.d/jonathonf-vlc.gpg
[1] /etc/apt/trusted.gpg.d/noobslab-apps.gpg
[2] /etc/apt/trusted.gpg.d/noobslab-mint.gpg
[3] /etc/apt/trusted.gpg.d/noobslab-themes.gpg
Set 3 of 6, preserve files [1 - 3, all] (943 bytes each): 2
[-] /etc/apt/trusted.gpg.d/noobslab-apps.gpg
[+] /etc/apt/trusted.gpg.d/noobslab-mint.gpg
[-] /etc/apt/trusted.gpg.d/noobslab-themes.gpg
[1] /etc/apt/trusted.gpg.d/webupd8team-tor-browser.gpg
[2] /etc/apt/trusted.gpg.d/webupd8team-y-ppa-manager.gpg
Set 4 of 6, preserve files [1 - 2, all] (6570 bytes each): 1
[+] /etc/apt/trusted.gpg.d/webupd8team-tor-browser.gpg
[-] /etc/apt/trusted.gpg.d/webupd8team-y-ppa-manager.gpg
[1] /etc/apt/trusted.gpg.d/ubuntu-mate-dev-ppa.gpg
[2] /etc/apt/trusted.gpg.d/ubuntu-mate-dev-trusty-mate.gpg
Set 5 of 6, preserve files [1 - 2, all] (1313 bytes each): 2
[-] /etc/apt/trusted.gpg.d/ubuntu-mate-dev-ppa.gpg
[+] /etc/apt/trusted.gpg.d/ubuntu-mate-dev-trusty-mate.gpg
[1] /etc/apt/trusted.gpg.d/mc3man-mpv-tests.gpg
[2] /etc/apt/trusted.gpg.d/mc3man-trusty-media.gpg
Set 6 of 6, preserve files [1 - 2, all] (527 bytes each): 2
[-] /etc/apt/trusted.gpg.d/mc3man-mpv-tests.gpg
[+] /etc/apt/trusted.gpg.d/mc3man-trusty-media.gpg
すべてのgpgランチパッドのppaキーを同じ/etc/apt/trusted.gpg
キーリングに追加することが唯一の解決策ですか?
編集3:/etc/apt/trusted.gpg.d/
に16個の追加の(拒否された)キーがあるので、それらを/etc/apt/trusted.gpg
キーリングに移動します。
$ apt-key list 2>&1 >/dev/null | awk -F"[\`']" '/resource limit/{print "Sudo apt-key add "$2" 2>/dev/null ; Sudo \\rm -vf "$2}' | sh -x
+ Sudo apt-key add /etc/apt/trusted.gpg.d/pypy-ppa.gpg
+ Sudo rm -vf /etc/apt/trusted.gpg.d/pypy-ppa.gpg
removed ‘/etc/apt/trusted.gpg.d/pypy-ppa.gpg’
+ Sudo apt-key add /etc/apt/trusted.gpg.d/rvm-smplayer.gpg
+ Sudo rm -vf /etc/apt/trusted.gpg.d/rvm-smplayer.gpg
removed ‘/etc/apt/trusted.gpg.d/rvm-smplayer.gpg’
+ Sudo apt-key add /etc/apt/trusted.gpg.d/sbates-ppa.gpg
+ Sudo rm -vf /etc/apt/trusted.gpg.d/sbates-ppa.gpg
removed ‘/etc/apt/trusted.gpg.d/sbates-ppa.gpg’
+ Sudo apt-key add /etc/apt/trusted.gpg.d/skunk-pepper-flash.gpg
+ Sudo rm -vf /etc/apt/trusted.gpg.d/skunk-pepper-flash.gpg
removed ‘/etc/apt/trusted.gpg.d/skunk-pepper-flash.gpg’
+ Sudo apt-key add /etc/apt/trusted.gpg.d/smathot-cogscinl.gpg
+ Sudo rm -vf /etc/apt/trusted.gpg.d/smathot-cogscinl.gpg
removed ‘/etc/apt/trusted.gpg.d/smathot-cogscinl.gpg’
+ Sudo apt-key add /etc/apt/trusted.gpg.d/stebbins-handbrake-releases.gpg
+ Sudo rm -vf /etc/apt/trusted.gpg.d/stebbins-handbrake-releases.gpg
removed ‘/etc/apt/trusted.gpg.d/stebbins-handbrake-releases.gpg’
+ Sudo apt-key add /etc/apt/trusted.gpg.d/stefanobalocco-multimedia.gpg
+ Sudo rm -vf /etc/apt/trusted.gpg.d/stefanobalocco-multimedia.gpg
removed ‘/etc/apt/trusted.gpg.d/stefanobalocco-multimedia.gpg’
+ Sudo apt-key add /etc/apt/trusted.gpg.d/team-xbmc-ppa.gpg
+ Sudo rm -vf /etc/apt/trusted.gpg.d/team-xbmc-ppa.gpg
removed ‘/etc/apt/trusted.gpg.d/team-xbmc-ppa.gpg’
+ Sudo apt-key add /etc/apt/trusted.gpg.d/timchen119-bluez5-trusty.gpg
+ Sudo rm -vf /etc/apt/trusted.gpg.d/timchen119-bluez5-trusty.gpg
removed ‘/etc/apt/trusted.gpg.d/timchen119-bluez5-trusty.gpg’
+ Sudo apt-key add /etc/apt/trusted.gpg.d/ubuntu-mate-dev-trusty-mate.gpg
+ Sudo rm -vf /etc/apt/trusted.gpg.d/ubuntu-mate-dev-trusty-mate.gpg
removed ‘/etc/apt/trusted.gpg.d/ubuntu-mate-dev-trusty-mate.gpg’
+ Sudo apt-key add /etc/apt/trusted.gpg.d/ubuntu-toolchain-r-test.gpg
+ Sudo rm -vf /etc/apt/trusted.gpg.d/ubuntu-toolchain-r-test.gpg
removed ‘/etc/apt/trusted.gpg.d/ubuntu-toolchain-r-test.gpg’
+ Sudo apt-key add /etc/apt/trusted.gpg.d/ufleisch-kid3.gpg
+ Sudo rm -vf /etc/apt/trusted.gpg.d/ufleisch-kid3.gpg
removed ‘/etc/apt/trusted.gpg.d/ufleisch-kid3.gpg’
+ Sudo apt-key add /etc/apt/trusted.gpg.d/unit193-inxi.gpg
+ Sudo rm -vf /etc/apt/trusted.gpg.d/unit193-inxi.gpg
removed ‘/etc/apt/trusted.gpg.d/unit193-inxi.gpg’
+ Sudo apt-key add /etc/apt/trusted.gpg.d/webupd8team-tor-browser.gpg
+ Sudo rm -vf /etc/apt/trusted.gpg.d/webupd8team-tor-browser.gpg
removed ‘/etc/apt/trusted.gpg.d/webupd8team-tor-browser.gpg’
+ Sudo apt-key add /etc/apt/trusted.gpg.d/wseverin-ppa.gpg
+ Sudo rm -vf /etc/apt/trusted.gpg.d/wseverin-ppa.gpg
removed ‘/etc/apt/trusted.gpg.d/wseverin-ppa.gpg’
+ Sudo apt-key add /etc/apt/trusted.gpg.d/xuzhen666-gnome-mpv.gpg
+ Sudo rm -vf /etc/apt/trusted.gpg.d/xuzhen666-gnome-mpv.gpg
removed ‘/etc/apt/trusted.gpg.d/xuzhen666-gnome-mpv.gpg’
$ apt-key list >/dev/null
$
問題が修正されました。
過酷ではありませんが、PPAが多すぎて、問題を修正するには 一部を取り除く必要があります です。ごめんなさい :(
多くの人がppa-purge
しかし、これによりキーが削除されるかどうかは100%わかりません。そのため、PPAを削除した後で、キーも削除されていることを確認する必要があります。
一部のPPAが同じキー番号を使用しているかどうかを確認してください。 使用している場合は、重複するキーを削除して、40未満の番号を取得できるようにします。Ubuntumate Ppasはおそらく同じキーを使用するため、重複が見つかった場合は、おそらく削除できます。
さらに、webupd8 ppa(おそらく同じキーも使用する)のような一部のppaは保守されなくなったため、これらのppaを削除できます。残念ながら、 webupd8のPPAは2017年以降更新されていません。
Skunk pepperflash ppa 2016年以降に更新されていない さらに、pepperflashインストーラーppaも必要ありません ソフトウェアと更新でCanonicalリポジトリを有効にするだけです) を実行してから、Sudo apt update; Sudo apt install Adobe-flashplugin
。 こちらもご覧ください
privoox ppa も2016年以降更新されていません。
これらは私が持っているPPAだけです チェックにGoogleを使用 。 Googleを使用してこれらの残りを自分でチェックし、どのPPAがまだアクティブで、どのPPAが維持されていないかを確認する必要があります。