오답 노트

[Ubuntu & Docker] E: Package 'docker-ce' has no installation candidate

데구루_ 2024. 4. 25. 10:02

Ubuntu 환경에서 Docker를 설치할 때 'E: Package 'docker-ce' has no installation candidate'와 같은 오류가 발생한다면 다음의 순서대로 해보시길 권장드립니다.

아무래도 신규로 설치를 하다 보니 이런 오류가 발생하는 듯 합니다.

 

개인적으론 apt-get update를 하지 않아서..(쿨럭) 발생한 오류였습니다.

 

정리를 해보면 다음과 같습니다.

$ sudo apt-get update
$ sudo apt-get install ca-certificates curl gnupg lsb-release
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
$ apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.io

공식 홈페이지에서 권장한 방법이니 한 번 실행해보시길..