Kali Signing Key Fix
- 최근 칼리 리눅스 VM 환경에서
apt명령 사용 시에 서명 키 관련 오류가 발생하며 패키지가 정상적으로 업데이트/설치되지 않는 경우가 있었는데요. 이에 대한 해결 방법을 기록하려 합니다.
Abstraction
Kali Linux에서 2025년 5월 이전에 출시된 환경에 영향을 미치는 서명 키 문제가 발생했습니다. 이로 인해 APT 기능을 더 이상 사용할 수 없게 되어 APT를 통해 업데이트를 적용하고 새 패키지를 설치하는 데 영향을 미치게 됩니다. apt 명령어 사용 시 아래 오류가 발생하는 경우 공개 키를 신규 배포 버전으로 가져와야 합니다.
apt update명령어 입력 시 오류 발생- The following signatures couldn’t be verified because the public key is not available
# apt update
Get:1 http://kali.download/kali kali-rolling InRelease [41.5 kB]
Err:1 http://kali.download/kali kali-rolling InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ED65462EC8D5E4C5 Fetched 41.5 kB in 0s (89.1 kB/s)
All packages are up to date.
Warning: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://kali.download/kali kali-rolling InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ED65462EC8D5E4C5
Warning: Failed to fetch http://kali.download/kali/dists/kali-rolling/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ED65462EC8D5E4C5
Warning: Some index files failed to download. They have been ignored, or old ones used instead.Solution
- 문제 해결을 위해 칼리 리눅스에서 아래 명령어를 실행합니다.
- 이후
apt명령어 사용 시 오류 발생하지 않고 정상 실행됩니다.
- 이후
# SOULTION 1. (apt-key was deprecated, but it works untill kali 2025)
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ED65462EC8D5E4C5
# SOLUTION 2. (RECOMMENDED)
sudo -E wget https://archive.kali.org/archive-keyring.gpg -O /usr/share/keyrings/kali-archive-keyring.gpg
[ . . . ]
sudo apt update
Get:1 http://mirror.keiminem.com/kali kali-rolling InRelease [34.0 kB]
Get:2 http://mirror.keiminem.com/kali kali-rolling/non-free amd64 Packages [188 kB]
Get:3 http://mirror.keiminem.com/kali kali-rolling/non-free-firmware amd64 Packages [11.3 kB]
Get:4 http://mirror.keiminem.com/kali kali-rolling/contrib amd64 Packages [114 kB]
Get:5 http://mirror.keiminem.com/kali kali-rolling/main amd64 Packages [21.0 MB]
Fetched 21.3 MB in 2s (8654 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1022 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: http://http.kali.org/kali/dists/kali-rolling/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.