헤르메스 LIFE

[Ubuntu] sudo apt update 시 오류 해결 본문

Exception

[Ubuntu] sudo apt update 시 오류 해결

헤르메스의날개 2024. 4. 26. 00:35
728x90

sudo apt update 시 아래와 같은 오류가 발생했습니다.

$ sudo apt update
[sudo] jypark 암호: 
기존:1 http://mirror.kakao.com/ubuntu jammy InRelease
기존:2 http://mirror.kakao.com/ubuntu jammy-updates InRelease                            
기존:3 http://mirror.kakao.com/ubuntu jammy-backports InRelease                          
기존:4 https://download.docker.com/linux/ubuntu jammy InRelease                          
기존:5 https://dl.google.com/linux/chrome/deb stable InRelease                           
기존:6 http://security.ubuntu.com/ubuntu jammy-security InRelease                        
기존:7 https://repos.azul.com/zulu/deb stable InRelease               
기존:8 https://ppa.launchpadcontent.net/atareao/atareao/ubuntu jammy InRelease
기존:9 https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu jammy InRelease
기존:10 https://ppa.launchpadcontent.net/ricotz/docky/ubuntu jammy InRelease
받기:11 http://download.opensuse.org/repositories/shells:/zsh-users:/zsh-autosuggestions/xUbuntu_22.04  InRelease [1,567 B]
오류:11 http://download.opensuse.org/repositories/shells:/zsh-users:/zsh-autosuggestions/xUbuntu_22.04  InRelease
  다음 서명이 올바르지 않습니다: EXPKEYSIG 767B5F350F20116F shells:zsh-users OBS Project <shells:zsh-users@build.opensuse.org>
내려받기 1,567 바이트, 소요시간 5초 (337 바이트/초)
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다... 완료
상태 정보를 읽는 중입니다... 완료        
3 패키지를 업그레이드할 수 있습니다. 확인하려면 'apt list --upgradable'를 실행하십시오.
W: https://download.docker.com/linux/ubuntu/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: https://repos.azul.com/zulu/deb/dists/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://download.opensuse.org/repositories/shells:/zsh-users:/zsh-autosuggestions/xUbuntu_22.04  InRelease: 다음 서명이 올바르지 않습니다: EXPKEYSIG 767B5F350F20116F shells:zsh-users OBS Project <shells:zsh-users@build.opensuse.org>
W: http://download.opensuse.org/repositories/shells:/zsh-users:/zsh-autosuggestions/xUbuntu_22.04/InRelease 파일을 받는데 실패했습니다  다음 서명이 올바르지 않습니다: EXPKEYSIG 767B5F350F20116F shells:zsh-users OBS Project <shells:zsh-users@build.opensuse.org>
W: Some index files failed to download. They have been ignored, or old ones used instead.

오류 #1

오류:11 http://download.opensuse.org/repositories/shells:/zsh-users:/zsh-autosuggestions/xUbuntu_22.04  InRelease
# /etc/apt/sources.list.d 디렉토리로 이동
$ cd /etc/apt/sources.list.d

# zsh-users:zsh-autosuggestions.list 파일 수정
$ sudo vi zsh-users:zsh-autosuggestions.list
[sudo] jypark 암호:

해결 #1

zsh-users:zsh-autosuggestions.list 파일

http://download.opensuse.org -> https://download.opensuse.org 로 변경

# zsh-users:zsh-autosuggestions.list 파일 전체
deb https://download.opensuse.org/repositories/shells:/zsh-users:/zsh-autosuggestions/xUbuntu_22.04/ /

오류 #2

다음 서명이 올바르지 않습니다: EXPKEYSIG 767B5F350F20116F shells:zsh-users OBS Project <shells:zsh-users@build.opensuse.org>

해결 #2 - 이 방법으로는 해결이 안되는 것 같습니다.

# 패키지를 업그레이드 가능목록 확인
$ sudo apt list --upgradable          
나열 중... 완료
python3-update-manager/jammy-updates,jammy-updates 1:22.04.20 all [다음에서 업그레이드 가능: 1:22.04.19]
update-manager-core/jammy-updates,jammy-updates 1:22.04.20 all [다음에서 업그레이드 가능: 1:22.04.19]
update-manager/jammy-updates,jammy-updates 1:22.04.20 all [다음에서 업그레이드 가능: 1:22.04.19]

해결 #2-1  - 이 방법으로도 해결이 안되는 것 같습니다.

$ cd ~

$ sudo sh -c "echo 'deb https://download.opensuse.org/repositories/shells:/zsh-users:/zsh-autosuggestions/xUbuntu_22.04/ /' > /etc/apt/sources.list.d/zsh-users:zsh-autosuggestions.list"

$ sudo wget -qnv https://download.opensuse.org/repositories/shells:/zsh-users:/zsh-autosuggestions/xUbuntu_22.04/Release.key -O- | gpg
gpg: WARNING: no command supplied.  Trying to guess what you mean ...
pub   rsa2048 2017-08-05 [SC] [expired: 2024-03-08]
      4919522E6859A90747C6D97A767B5F350F20116F
uid           shells:zsh-users OBS Project <shells:zsh-users@build.opensuse.org>

$ sudo apt-get update

오류 #3

An error occurred during the signature verification. 
The repository is not updated and the previous index files will be used. 
GPG error: https://download.docker.com/linux/ubuntu jammy InRelease: 
다음 서명들은 공개키가 없기 때문에 인증할 수 없습니다: NO_PUBKEY 7EA0A9C3F273FCD8

해결 #3

공개키를 갱신합니다.

/etc/apt/trusted.gpg 파일이 생성됩니다. 이미 존재한다면 추가적으로 갱신합니다.

$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7EA0A9C3F273FCD8
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.jFMTEXM3Oq/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 7EA0A9C3F273FCD8
gpg: key 8D81803C0EBFCD88: 1 duplicate signature removed
gpg: key 8D81803C0EBFCD88: public key "Docker Release (CE deb) <docker@docker.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1
# key 갱신
$ sudo apt-key adv --refresh-keys --keyserver keyserver.ubuntu.com
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.u0JwrfsJfK/gpg.1.sh --refresh-keys --keyserver keyserver.ubuntu.com
gpg: refreshing 10 keys from hkp://keyserver.ubuntu.com
gpg: key 871920D1991BC93C: "Ubuntu Archive Automatic Signing Key (2018) <ftpmaster@ubuntu.com>" not changed
gpg: key D94AA3F0EFE21092: "Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>" not changed
gpg: key 75CFD31C9E5DB0C8: "Launchpad PPA for Rico" not changed
gpg: key F63F0F2B90935439: "Launchpad PPA for kisak" not changed
gpg: key 7721F63BD38B4796: 2 duplicate signatures removed
gpg: key 7721F63BD38B4796: "Google Inc. (Linux Packages Signing Authority) <linux-packages-keymaster@google.com>" 1 new signature
gpg: key 6A9653F936FD5529: "Launchpad PPA for atareao" not changed
gpg: key 76F1A20FF987672F: "WineHQ packages <wine-devel@winehq.org>" not changed
gpg: key 8D81803C0EBFCD88: 1 duplicate signature removed
gpg: key 8D81803C0EBFCD88: "Docker Release (CE deb) <docker@docker.com>" not changed
gpg: key B1998361219BD9C9: "Azul Systems, Inc. (Package signing key.) <pki-signing@azulsystems.com>" not changed
gpg: Total number processed: 9
gpg:              unchanged: 8
gpg:         new signatures: 1

공개키 확인

$ sudo apt-key fingerprint
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
/etc/apt/trusted.gpg
--------------------
pub   rsa2048 2020-12-04 [SC] [expired: 2022-12-04]
      59FE 0256 8272 69DC 8157  8F92 8B57 C5C2 836F 4BEB
uid           [ expired] gLinux Rapture Automatic Signing Key (//depot/google3/production/borg/cloud-rapture/keys/cloud-rapture-pubkeys/cloud-rapture-signing-key-2020-12-03-16_08_05.pub) <glinux-team@google.com>

pub   rsa2048 2021-03-01 [SC] [expired: 2023-03-02]
      7F92 E05B 3109 3BEF 5A3C  2D38 FEEA 9169 307E A071
uid           [ expired] Rapture Automatic Signing Key (cloud-rapture-signing-key-2021-03-01-08_01_09.pub)

pub   rsa4096 2017-02-22 [SCEA]
      9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
uid           [ unknown] Docker Release (CE deb) <docker@docker.com>
sub   rsa4096 2017-02-22 [S]

/etc/apt/trusted.gpg.d/atareao-ubuntu-atareao.gpg
-------------------------------------------------
pub   rsa1024 2010-12-14 [SC]
      A3D8 A366 869F E2DC 5FFD  79C3 6A96 53F9 36FD 5529
uid           [ unknown] Launchpad PPA for atareao

/etc/apt/trusted.gpg.d/google-chrome.gpg
----------------------------------------
pub   rsa4096 2016-04-12 [SC]
      EB4C 1BFD 4F04 2F6D DDCC  EC91 7721 F63B D38B 4796
uid           [ unknown] Google Inc. (Linux Packages Signing Authority) <linux-packages-keymaster@google.com>
sub   rsa4096 2021-10-26 [S] [expires: 2024-10-25]
sub   rsa4096 2023-02-15 [S] [expires: 2026-02-14]
sub   rsa4096 2024-01-30 [S] [expires: 2027-01-29]

/etc/apt/trusted.gpg.d/kisak-ubuntu-kisak-mesa.gpg
--------------------------------------------------
pub   rsa4096 2017-11-30 [SC]
      EB8B 81E1 4DA6 5431 D750  4EA8 F63F 0F2B 9093 5439
uid           [ unknown] Launchpad PPA for kisak

/etc/apt/trusted.gpg.d/ricotz-ubuntu-docky.gpg
----------------------------------------------
pub   rsa1024 2009-03-30 [SC]
      38AE 4F60 E356 CE05 0312  FA17 75CF D31C 9E5D B0C8
uid           [ unknown] Launchpad PPA for Rico

/etc/apt/trusted.gpg.d/shells_zsh-users_zsh-autosuggestions.gpg
---------------------------------------------------------------
pub   rsa2048 2017-08-05 [SC] [expired: 2024-03-08]
      4919 522E 6859 A907 47C6  D97A 767B 5F35 0F20 116F
uid           [ expired] shells:zsh-users OBS Project <shells:zsh-users@build.opensuse.org>

/etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg
------------------------------------------------------
pub   rsa4096 2012-05-11 [SC]
      8439 38DF 228D 22F7 B374  2BC0 D94A A3F0 EFE2 1092
uid           [ unknown] Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>

/etc/apt/trusted.gpg.d/ubuntu-keyring-2018-archive.gpg
------------------------------------------------------
pub   rsa4096 2018-09-17 [SC]
      F6EC B376 2474 EDA9 D21B  7022 8719 20D1 991B C93C
uid           [ unknown] Ubuntu Archive Automatic Signing Key (2018) <ftpmaster@ubuntu.com>

 

728x90