Microsoft MVP성태의 닷넷 이야기
글쓴 사람
정성태 (seongtaejeong at gmail.com)
홈페이지
첨부 파일
 

apt update 시 "The repository 'http://deb.debian.org/debian buster Release' does not have a Release file." 오류

이상하군요, (Visual Studio로 생성한) ASP.NET Core 프로젝트의 dockerfile에 추가한 "apt update" 명령어가 docker build 시 오류가 발생합니다. 단순하게 "sdk;3.1-buster" 이미지만으로도 apt update가 실패합니다.

c:\temp> type test.dockerfile
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster
RUN apt-get update

c:\temp> docker build -f test.dockerfile -t test_dotnet_img .
[+] Building 10.8s (5/5) FINISHED                                                                  docker:desktop-linux
 => [internal] load build definition from test.dockerfile                                                          0.4s
 => => transferring dockerfile: 112B                                                                               0.0s
 => [internal] load metadata for mcr.microsoft.com/dotnet/core/sdk:3.1-buster                                      0.6s
 => [internal] load .dockerignore                                                                                  0.8s
 => => transferring context: 2B                                                                                    0.0s
 => CACHED [1/2] FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster@sha256:ed737e6920105e2a5cdcd13b9697e7973011e56  2.4s
 => => resolve mcr.microsoft.com/dotnet/core/sdk:3.1-buster@sha256:ed737e6920105e2a5cdcd13b9697e7973011e5619339ea  2.3s
 => ERROR [2/2] RUN apt-get update                                                                                 5.5s
------
 > [2/2] RUN apt-get update:
4.780 Ign:1 http://deb.debian.org/debian buster InRelease
4.788 Ign:2 http://deb.debian.org/debian-security buster/updates InRelease
4.794 Ign:3 http://deb.debian.org/debian buster-updates InRelease
4.801 Err:4 http://deb.debian.org/debian buster Release
4.801   404  Not Found [IP: 146.75.50.132 80]
4.815 Err:5 http://deb.debian.org/debian-security buster/updates Release
4.815   404  Not Found [IP: 146.75.50.132 80]
4.822 Err:6 http://deb.debian.org/debian buster-updates Release
4.822   404  Not Found [IP: 146.75.50.132 80]
5.067 Reading package lists...
5.078 E: The repository 'http://deb.debian.org/debian buster Release' does not have a Release file.
5.078 E: The repository 'http://deb.debian.org/debian-security buster/updates Release' does not have a Release file.
5.078 E: The repository 'http://deb.debian.org/debian buster-updates Release' does not have a Release file.
------
test.dockerfile:2
--------------------
   1 |     FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster
   2 | >>> RUN apt-get update
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update" did not complete successfully: exit code: 100

View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/zkz3vs4wtw6bpiinp9don2xk5

사실 sdk;3.1-buster 이미지의 근간이 되는 debian:10 이미지로도 동일한 오류가 발생합니다.

c:\temp> type debian.dockerfile
FROM debian:10
RUN apt-get update

c:\temp> docker build -f debian.dockerfile -t test_debian_img .
[+] Building 29.4s (5/5) FINISHED                                                                  docker:desktop-linux
 => [internal] load build definition from debian.dockerfile                                                        0.3s
 => => transferring dockerfile: 78B                                                                                0.1s
 => [internal] load metadata for docker.io/library/debian:10                                                       3.1s
 => [internal] load .dockerignore                                                                                  0.3s
 => => transferring context: 2B                                                                                    0.0s
 => [1/2] FROM docker.io/library/debian:10@sha256:58ce6f1271ae1c8a2006ff7d3e54e9874d839f573d8009c20154ad0f2fb0a2  11.0s
 => => resolve docker.io/library/debian:10@sha256:58ce6f1271ae1c8a2006ff7d3e54e9874d839f573d8009c20154ad0f2fb0a22  0.4s
 => => sha256:3892befd2c3f36ceb247ba7d906de12601d69b806597e65c4c837cf3d93df119 50.66MB / 50.66MB                   6.2s
 => => extracting sha256:3892befd2c3f36ceb247ba7d906de12601d69b806597e65c4c837cf3d93df119                          3.4s
 => ERROR [2/2] RUN apt-get update                                                                                12.8s
------
 > [2/2] RUN apt-get update:
1.603 Ign:1 http://deb.debian.org/debian buster InRelease
1.610 Ign:2 http://deb.debian.org/debian-security buster/updates InRelease
1.618 Ign:3 http://deb.debian.org/debian buster-updates InRelease
1.624 Err:4 http://deb.debian.org/debian buster Release
1.624   404  Not Found [IP: 146.75.50.132 80]
1.634 Err:5 http://deb.debian.org/debian-security buster/updates Release
1.634   404  Not Found [IP: 146.75.50.132 80]
1.642 Err:6 http://deb.debian.org/debian buster-updates Release
1.642   404  Not Found [IP: 146.75.50.132 80]
1.646 Reading package lists...
1.654 E: The repository 'http://deb.debian.org/debian buster Release' does not have a Release file.
1.654 E: The repository 'http://deb.debian.org/debian-security buster/updates Release' does not have a Release file.
1.654 E: The repository 'http://deb.debian.org/debian buster-updates Release' does not have a Release file.
------
debian.dockerfile:2
--------------------
   1 |     FROM debian:10
   2 | >>> RUN apt-get update
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update" did not complete successfully: exit code: 100

View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/yzh9f8knxns4twzcukxwrgma0

저도 이젠 유경험자도 보니 ^^ 원인을 대충 짐작할 수 있었는데요,

dockerfile - 구 버전의 .NET Core 이미지 사용 시 apt update 오류
; https://www.sysnet.pe.kr/2/0/13331

당시의 "stretch" 버전에 이어서 이제는 "buster" 버전이 지원 종료(EOL, End Of Life)가 되었기 때문입니다.
c:\temp> docker run -it --rm --name my_test test_debian_img /bin/bash
root@1434c0b6d1ec:/# cat /etc/apt/sources.list
# deb http://snapshot.debian.org/archive/debian/20221219T000000Z buster main
deb http://deb.debian.org/debian buster main
# deb http://snapshot.debian.org/archive/debian-security/20221219T000000Z buster/updates main
deb http://deb.debian.org/debian-security buster/updates main
# deb http://snapshot.debian.org/archive/debian/20221219T000000Z buster-updates main
deb http://deb.debian.org/debian buster-updates main

따라서, 이번에도 repo 주소를 archive 쪽으로 변경해 주면 됩니다.

c:\temp> type debian.dockerfile
FROM debian:10
RUN echo "deb http://archive.debian.org/debian buster main" > /etc/apt/sources.list
RUN apt-get update

c:\temp> docker build -f debian.dockerfile -t test_debian_img .




저렇게 archive 주소로 변경한 이후 apt install 명령어에서 procps 패키지 설치 시 새롭게 문제가 발생했습니다.

# apt install procps -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 procps : Depends: libncurses6 (>= 6) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

# apt install libncurses6 -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libncurses6 : Depends: libtinfo6 (= 6.1+20181013-2+deb10u2) but 6.1+20181013-2+deb10u5 is to be installed
               Recommends: libgpm2 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

여기서 근본적인 문제는 libncurses6가 정확히 6.1+20181013-2+deb10u2 버전에 의존적이라고 명시했다는 점입니다. 그래서 해당 구성 요소를 이렇게 설치하면 안 되고,

// 6.1+20181013-2+deb10u5 버전의 libtinfo6가 설치됨

# apt install libtinfo6 -y

정확히 버전까지 지정해야 하는데요, 아쉽게도 경고가 나옵니다.

# apt install libtinfo6=6.1+20181013-2+deb10u2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libfdisk1 libmount1 libsmartcols1
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  fdisk libncursesw6 mount sysvinit-utils util-linux
The following packages will be DOWNGRADED:
  libtinfo6
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  fdisk libncursesw6 (due to fdisk) mount util-linux (due to mount) sysvinit-utils
0 upgraded, 0 newly installed, 1 downgraded, 5 to remove and 0 not upgraded.
Need to get 325 kB of archives.
After this operation, 5897 kB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
 ?] Yes, do as I say!

사실 docker 이미지라면 fdisk 등의 도구가 필요 없을 테니 제거해도 무방할 것입니다. 어쨌든 저렇게 변경하면 이후 procps 설치까지 문제는 없습니다.

정리하면, procps 설치를 한다면 이렇게 dockerfile을 구성하면 됩니다.

FROM debian:10
RUN echo "deb http://archive.debian.org/debian buster main" > /etc/apt/sources.list

RUN apt update && apt upgrade -y

RUN echo "Yes, do as I say!" | apt install libtinfo6=6.1+20181013-2+deb10u2
RUN apt install libncurses6 -y
RUN apt install procps -y




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]







[최초 등록일: ]
[최종 수정일: 9/1/2025]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




... 151  152  153  154  155  156  [157]  158  159  160  161  162  163  164  165  ...
NoWriterDateCnt.TitleFile(s)
1215정성태1/9/201231456제니퍼 .NET: 20. 제니퍼 닷넷 적용 사례 (3) - '닷넷'이 문제일까? '닷넷 개발자'가 문제일까? [6]
1214정성태1/3/201228210제니퍼 .NET: 19. 제니퍼 닷넷 설치/제거 방법 - IIS
1213정성태12/31/201128242.NET Framework: 290. WCF - 접속된 클라이언트의 IP 주소 알아내는 방법 - 두 번째 이야기
1212정성태12/31/201128082오류 유형: 145. The trust relationship between this workstation and the primary domain failed.
1211정성태12/31/201133040.NET Framework: 289. WindowsFormsHost를 사용하는 XBAP 응용 프로그램파일 다운로드1
1210정성태12/30/201151797.NET Framework: 288. FFmpeg.exe를 이용한 C# 동영상 인코더 예제 [9]파일 다운로드1
1209정성태12/29/201126417개발 환경 구성: 138. BizTalk 2006 설치 방법
1208정성태12/28/201150571.NET Framework: 287. Excel Sheet를 WinForm에서 사용하는 방법 [8]파일 다운로드2
1207정성태12/26/201128948.NET Framework: 286. x86/x64로 구분된 코드를 포함하는 경우, 다중으로 어셈블리를 만들어야 할까요?파일 다운로드1
1206정성태12/25/201129380.NET Framework: 285. Shader 강좌와 함께 배워보는 XNA Framework (3) - 텍스처 매핑 예제파일 다운로드1
1205정성태12/25/201135885.NET Framework: 284. Thread 개체의 Interrupt와 Abort의 차이점파일 다운로드1
1204정성태12/22/201129236.NET Framework: 283. MEF를 ASP.NET에 성능 손실 없이 적용하려면? [7]
1203정성태12/21/201129527제니퍼 .NET: 18. MEF가 적용된 ASP.NET 웹 사이트를 제니퍼 닷넷으로 모니터링 해본 결과! [6]
1202정성태12/21/201130060오류 유형: 144. The database '...' cannot be opened because it is version 661.
1201정성태12/14/201145294디버깅 기술: 47. .NET Reflector를 이용한 "소스 코드가 없는" 어셈블리 디버깅 [4]
1200정성태12/11/201130985디버깅 기술: 46. Windbg 확장 DLL 만들기 (2) - Debugger Extension API 사용파일 다운로드1
1199정성태12/11/201131897VC++: 55. JNI DLL 컴파일 시 x86과 x64의 Export된 함수의 이름이 왜 다를까요? [2]파일 다운로드1
1198정성태12/9/201135680디버깅 기술: 45. Windbg 확장 DLL 만들기 (1) - 스레드를 강제 종료시키는 명령어 [2]파일 다운로드1
1197정성태12/9/201134175.NET Framework: 282. Shader 강좌와 함께 배워보는 XNA Framework (2) - RenderMonkey의 Shader/Model 파일 연동파일 다운로드2
1196정성태12/9/201137692.NET Framework: 281. Shader 강좌와 함께 배워보는 XNA Framework (1) - 기초 프로그램 구조 [3]파일 다운로드2
1195정성태12/8/201151541오류 유형: 143. DXSDK_Jun10.exe 설치 시 "Error Code: S1023" 오류 해결하는 방법 [4]
1194정성태12/8/201139356개발 환경 구성: 137. Visual C++ 런타임 구성요소에 대한 디버그 버전 설치하는 방법
1193정성태12/8/201126370오류 유형: 142. Windows Phone SDK 7.1 설치 시 Expression Blend 제거를 요구하는 경우
1192정성태12/8/201129279개발 환경 구성: 136. Windows 7 SP1의 IIS에서 사용자 프로파일을 로드하는 방법
1191정성태12/6/201130419.NET Framework: 280. MVC3에서 JavaScriptSerializer 재정의하는 방법파일 다운로드1
1190정성태12/6/201133417오류 유형: 141. Visual C++ 컴파일 오류 - error C2275: 'xxxxx' : illegal use of this type as an expression [1]
... 151  152  153  154  155  156  [157]  158  159  160  161  162  163  164  165  ...