Coding, Filming, and Nothing
article thumbnail

서버에서 도커 환경 세팅하고 컨테이너에서 초기설정을 하는데 apt-get update, apt-get install ... 이 모두 에러를 나타내며 동작하지 않는다.

 

 

뭘해도 안 되는 에러들

The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC

Repository 'http://security.debian.org/debiansecurity buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable'

Repository 'http://deb.debian.org/debian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'

The repository 'https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64  InRelease' is no longer signed.

Repository 'http://deb.debian.org/debian buster-updates InRelease' changed its 'Suite' value from 'stable-updates' to 'oldstable-updates'

 

시간은 없고 apt-get을 사용해야 다음 세팅을 진행할 수 있어서 구글링을 급급하게 해봤고, stackoverflow에서 나오는 아래의 명령어들을 아무거나 긁어서 해봤다. 그런데도 안 되었다.

apt-get --allow-releaseinfo-change update
apt-get --allow-releaseinfo-change-suite update
apt-get update --allow-insecure-repositories
apt-get --allow-unauthenticated update

 

옵션이 문제가 아니고, 다시 에러를 천천히 읽어보면 ..because the public key is not available: NO_PUBKEY A4B469963BF863CC . 즉 public key가 없어서 문제가 발생을 하고 있다는 것이다. 

 

이럴 때는 수동으로 public key를 설치를 해주어야한다.

 

 

 

1. 설치해야하는 Key 검색하기

아래의 사이트를 통해서 설치해야하는 Public Key를 찾을 수 있다.

http://pgp.mit.edu/

 

MIT PGP Key Server

 

pgp.mit.edu

 

에러 문구의 가장 마지막 (NO_PUBKEY 뒤) 시리얼이 우리가 찾아야하는 것이다. A4B469963BF863CC

검색을 할 때는 찾아야하는 시리얼 앞에 '0x'를 붙여서 검색을 한다.

A4B469963BF863CC → 0xA4B469963BF863CC 

 

 

알맞게 형식을 맞추어 입력을 한 뒤 Do the search! 버튼을 누른다.

그럼 아래와 같은 결과가 뜬다.

 

 

 

 

 

 

2. public Key (서버에) 수동설치

우리가 필요한 public key는 3BF863CC 이다. 해당 key를 아래의 명령어 형식에 집어넣고 서버 CMD에서 실행시키면 된다.

 

*위에서 보았던 GPG 에러 결과 알림

W: GPG error: https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64  InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC

 

# apt-key adv --fetch-keys [GPG error repo 주소]/[검색해서 찾은 public Key].pub
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub


# 더 짧고 간단한거 (검색도 할 필요 없음)
# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys [NO_PUBKEY 키]
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC

public key 수동 설치 명령 결과

 

설치가 잘 되었다고 뜬다.

 

3. 동작 확인

이제 다시 아까 동작하지 못했던 apt-get update 명령어를 수행해보자.

 

잘 된다! 

profile

Coding, Filming, and Nothing

@_안쑤

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!