임베디드/Raspberry PI

[라즈베리파이] apt-get update 에러 해결방법

쉬고싶은 거북이 2025. 3. 10. 14:11

라즈베리파이에서 패키지 오류로 인한 update에러 발생 시

Get:1 https://download.docker.com/linux/raspbian stretch InRelease [31.1 kB]
Get:2 http://archive.raspberrypi.org/debian stretch InRelease [41.9 kB]
Ign:3 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Err:4 http://raspbian.raspberrypi.org/raspbian stretch Release
  404  Not Found [IP: 93.93.128.193 80]
Get:5 http://archive.raspberrypi.org/debian stretch/main armhf Packages [192 kB]
Reading package lists... Done
E: The repository 'http://raspbian.raspberrypi.org/raspbian stretch Release' does no longer have a Release file.
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.

 

 

최신 패키지 릴리즈 정보를 바꿔줘야 합니다.

sudo nano /etc/apt/sources.list

 

구 버전

deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi

 

 

신 버전

deb http://deb.debian.org/debian bullseye main contrib non-free
deb http://security.debian.org/debian-security bullseye-security main contrib non-free
deb http://deb.debian.org/debian bullseye-updates main contrib non-free

 

 

정상 완료 결과

Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://deb.debian.org/debian bullseye-updates InRelease
Hit:3 http://security.debian.org/debian-security bullseye-security InRelease
Get:4 https://download.docker.com/linux/raspbian stretch InRelease [31.1 kB]
Hit:5 https://deb.nodesource.com/node_20.x nodistro InRelease
Hit:6 http://archive.raspberrypi.org/debian stretch InRelease
Fetched 31.1 kB in 4s (8,636 B/s)
Reading package lists... Done

 


이슈주의)

1. GPG 에러 발생 시

Get:1 http://security.debian.org/debian-security bullseye-security InRelease [27.2 kB]
Get:2 http://deb.debian.org/debian bullseye InRelease [116 kB]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:4 https://download.docker.com/linux/raspbian stretch InRelease [31.1 kB]
Ign:1 http://security.debian.org/debian-security bullseye-security InRelease
Hit:5 http://archive.raspberrypi.org/debian stretch InRelease
Ign:2 http://deb.debian.org/debian bullseye InRelease
Ign:3 http://deb.debian.org/debian bullseye-updates InRelease
Fetched 218 kB in 2s (98.7 kB/s)
Reading package lists... Done
W: GPG error: http://security.debian.org/debian-security bullseye-security InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 112695A0E562B32A NO_PUBKEY 54404762BBB6E853
W: The repository 'http://security.debian.org/debian-security bullseye-security InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://deb.debian.org/debian bullseye InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY 6ED0E7B82643E131 NO_PUBKEY 605C66F00D6C9793
W: The repository 'http://deb.debian.org/debian bullseye InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://deb.debian.org/debian bullseye-updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY 6ED0E7B82643E131
W: The repository 'http://deb.debian.org/debian bullseye-updates InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.

 

2022.06.08 - [OS 운영체제/Linux] - [groomIDE] apt-get update 에러 해결 방법 (GPG오류)

 

[groomIDE] apt-get update 에러 해결 방법 (GPG오류)

구름 IDE에서 apt-get update 안되는 상황에 조치상황 root@goorm:/workspace# sudo apt-get update받기:1 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 InRelease [1,581 B]무시:2 https://developer.download.nvidia.co

12340zszs.tistory.com

 

2. 위 글을 보고 GPG 키 등록을 해준다. ( recv-keys 다음은 본인에게 나온걸로 다 바꿔야함)

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 112695A0E562B32A 54404762BBB6E853 0E98404D386FA1D9 6ED0E7B82643E131 605C66F00D6C9793

 

 

2.1) dirmngr 에러 발생 시

gpg: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory
gpg: connecting dirmngr at '/tmp/apt-key-gpghome.TBvl7I3fBg/S.dirmngr' failed: No such file or directory
gpg: keyserver receive failed: No dirmngr
gpg: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory
gpg: connecting dirmngr at '/tmp/apt-key-gpghome.TBvl7I3fBg/S.dirmngr' failed: No such file or directory
gpg: keyserver receive failed: No dirmngr

 

dirmngr 설치 해주면 됩니다.

sudo apt-get install dirmngr