서버에서 도커 환경 세팅하고 컨테이너에서 초기설정을 하는데 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를 찾을 수 있다.
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
설치가 잘 되었다고 뜬다.
3. 동작 확인
이제 다시 아까 동작하지 못했던 apt-get update 명령어를 수행해보자.
잘 된다!
'개발새발 > 개발 셋업' 카테고리의 다른 글
윈도우 포맷 후 환경 설정 및 설치 체크리스트 (0) | 2023.02.24 |
---|---|
PyTorch Lightning 소개 및 설명 (0) | 2023.02.13 |
[Docker] 서버 Docker, miniconda 개발 환경 세팅 (1) | 2023.01.18 |
[Conda] 컴퓨터비전을 위한 토치환경 셋업 (0) | 2023.01.18 |
[SSH] Authorized Keys generating (ssh key) | ssh 접속을 위한 key 생성 (0) | 2022.09.21 |