임베디드 장치에 apt-get을 구현하려고 합니다. 테스트를 위해 Raspbian 저장소 중 하나를 사용하고 있지만 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