組み込みデバイスにapt-getを実装しようとしています。テストのためにRaspbianリポジトリの1つを使用していますが、apt-getアップデートで私のキーリングでサポートされていないファイル形式があることを示すメッセージが表示されます。
古いキーリングを削除し、raspbian.orgから新しいキーリングをダウンロードし、apt-keyを使用して追加しました。その結果、gpg(v4)ファイルが作成されました。私の考えでは、apt_2形式ですが、aptはそうではありません。気に入らないようです。
誰かがここで何が起こっているのか、私が一日中何が間違っているのか教えてもらえますか?
挨拶
以下のコンソール出力を参照してください。
# rm trusted.gpg
# wget https://archive.raspbian.org/raspbian.public.key -O - | sudo apt-key add -
Connecting to archive.raspbian.org (93.93.128.191:443)
writing to stdout
- 100% |********************************************************************************************************| 1776 0:00:00 ETA
written to stdout
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK
# file trusted.gpg
trusted.gpg: PGP/GPG key public ring (v4) created Sun Apr 1 21:02:33 2012 RSA (Encrypt or Sign) 2048 bits MPI=0xcf5b981af19c88b1...
# apt-get update
Get:1 http://archive.raspbian.org/raspbian bookworm InRelease [15.0 kB]
Err:1 http://archive.raspbian.org/raspbian bookworm InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9165938D90FDDD2E
Reading package lists... Error!
W: http://archive.raspbian.org/raspbian/dists/bookworm/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg are ignored as the file has an unsupported filetype.
W: GPG error: http://archive.raspbian.org/raspbian bookworm InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9165938D90FDDD2E
E: The repository 'http://archive.raspbian.org/raspbian bookworm 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.
E: flAbsPath on /var/lib/dpkg/status failed - realpath (2: No such file or directory)
E: Could not open file - open (2: No such file or directory)
E: Problem opening
E: The package lists or status file could not be parsed or opened.
# apt-key --keyring /etc/apt/trusted.gpg list
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
/etc/apt/trusted.gpg
--------------------
pub rsa2048 2012-04-01 [SC]
A0DA 38D0 D76E 8B5D 6388 7281 9165 938D 90FD DD2E
uid [ unknown] Mike Thompson (Raspberry Pi Debian armhf ARMv6+VFP) <[email protected]>
sub rsa2048 2012-04-01 [E]
# apt --version
apt 2.2.4 ()
# gpg --version
gpg (GnuPG) 2.3.3-unknown
libgcrypt 1.9.4-unknown
Copyright (C) 2021 Free Software Foundation, Inc.
License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: /root/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
AEAD: EAX, OCB
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2