다양한 오래된 배포판에서 디버깅 도구를 테스트해야 합니다. Debian Wheezy와 함께 작동하지만 Debian Squeeze 도커 이미지를 사용하여 작동하는 컴파일러를 추가하고 도구를 빌드하는 것은 불가능해 보입니다. DockerHub에서 이미지를 가져온 다음 apt
날짜를 무시하도록 저장소를 수정하고 사용했습니다.archive.debian.org:
docker run -it --rm debian:squeeze
$ echo "deb http://archive.debian.org/debian squeeze main" > /etc/apt/sources.list
$ echo "deb http://archive.debian.org/debian-security squeeze/updates main" >> /etc/apt/sources.list
$ echo "Acquire::Check-Valid-Until no;" > /etc/apt/apt.conf.d/99no-check-valid-until
그 후 일반 설치를 수행합니다.
apt-get update
apt-get install build-essential
그러나 "E: Corrupted Package"로 인해 실패하며 이를 해결하는 데 도움이 되는 솔루션이 없습니다. 이 문제를 어떻게든 해결할 수 있을까요?
root@01feb057d927:/# apt-get install build-essential
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:
build-essential : Depends: libc6-dev but it is not going to be installed or
libc-dev
Depends: g++ (>= 4:4.4.3) but it is not going to be installed
E: Broken packages
root@01feb057d927:/#
답변1
Docker 이미지 libc6
에서 제공되므로 LTS 리포지토리도 필요합니다 .squeeze-lts
# apt-cache policy libc6-dev libc6
libc6:
Installed: 2.11.3-4+deb6u11
Candidate: 2.11.3-4+deb6u11
Version table:
*** 2.11.3-4+deb6u11 0
100 /var/lib/dpkg/status
그리고패키지 추적기이 버전은 에서 나온 것이라고 합니다 squeeze-lts
.
그래서 우리는 필요합니다또 다른 소스:
echo "deb http://archive.debian.org/debian squeeze-lts main" >> /etc/apt/sources.list
그 다음에:
root@dca025522204:/# apt-get update
Get:1 http://archive.debian.org squeeze Release.gpg [1655 B]
Get:2 http://archive.debian.org squeeze/updates Release.gpg [836 B]
Get:3 http://archive.debian.org squeeze-lts Release.gpg [819 B]
Get:4 http://archive.debian.org squeeze Release [96.0 kB]
Get:5 http://archive.debian.org squeeze/updates Release [86.9 kB]
Ign http://archive.debian.org squeeze Release
Ign http://archive.debian.org squeeze/updates Release
Get:6 http://archive.debian.org squeeze-lts Release [34.3 kB]
Ign http://archive.debian.org squeeze-lts Release
Hit http://archive.debian.org squeeze/main amd64 Packages
Hit http://archive.debian.org squeeze/updates/main amd64 Packages
Get:7 http://archive.debian.org squeeze-lts/main amd64 Packages [390 kB]
Fetched 428 kB in 3s (142 kB/s)
Reading package lists... Done
W: GPG error: http://archive.debian.org squeeze Release: The following signatures were invalid: KEYEXPIRED 1520281423 KEYEXPIRED 1501892461
W: GPG error: http://archive.debian.org squeeze/updates Release: The following signatures were invalid: KEYEXPIRED 1520281423
W: GPG error: http://archive.debian.org squeeze-lts Release: The following signatures were invalid: KEYEXPIRED 1587841717
root@dca025522204:/# apt-get install build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
binutils bzip2 cpp cpp-4.4 dpkg-dev fakeroot g++ g++-4.4 gcc gcc-4.4 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libc-dev-bin libc6-dev libdb4.7
libdpkg-perl libgdbm3 libgmp3c2 libgomp1 libmpfr4 libstdc++6-4.4-dev libtimedate-perl linux-libc-dev make manpages manpages-dev patch perl perl-modules
Suggested packages:
binutils-doc bzip2-doc cpp-doc gcc-4.4-locales debian-keyring g++-multilib g++-4.4-multilib gcc-4.4-doc libstdc++6-4.4-dbg gcc-multilib autoconf automake1.9 libtool flex bison gdb
gcc-doc gcc-4.4-multilib libmudflap0-4.4-dev libgcc1-dbg libgomp1-dbg libmudflap0-dbg libcloog-ppl0 libppl-c2 libppl7 glibc-doc libstdc++6-4.4-doc make-doc man-browser ed
diffutils-doc perl-doc libterm-readline-gnu-perl libterm-readline-perl-perl
The following NEW packages will be installed:
binutils build-essential bzip2 cpp cpp-4.4 dpkg-dev fakeroot g++ g++-4.4 gcc gcc-4.4 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libc-dev-bin libc6-dev
libdb4.7 libdpkg-perl libgdbm3 libgmp3c2 libgomp1 libmpfr4 libstdc++6-4.4-dev libtimedate-perl linux-libc-dev make manpages manpages-dev patch perl perl-modules
0 upgraded, 31 newly installed, 0 to remove and 0 not upgraded.
Need to get 35.4 MB of archives.
After this operation, 114 MB of additional disk space will be used.
Do you want to continue [Y/n]?