Debian Squeeze に 'build-essential' をインストールするにはどうすればよいですか?

Debian Squeeze に 'build-essential' をインストールするにはどうすればよいですか?

さまざまな古いディストリビューションでデバッグツールをテストする必要があります。 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]?

おすすめ記事