Debian 6 Squeeze - ビルド前提条件のインストール - gcc/g++

Debian 6 Squeeze - ビルド前提条件のインストール - gcc/g++

c / C ++コンパイラをインストールする必要があるのが最善の方法は、この目的のためにgcc / g ++をインストールすることです。 (マイコンピュータにはないようです。)

maistora@maistora:~$ gcc --version
bash: gcc: command not found

また、build-essential をインストールすると c/C++ コンパイラも付属するという内容も読みました。だから私がしたことは次のとおりです。

maistora@maistora:~$ sudo 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: gcc (>= 4:4.4.3) but it is not going to be installed
                   Depends: g++ (>= 4:4.4.3) but it is not going to be installed
E: Broken packages

それから理由はわかりませんが、依存関係を1つずつインストールすることを決め、次のように始めました。libc6-dev出力は次のとおりです。

maistora@maistora:~$ sudo apt-get install libc6-dev
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:
 libc6-dev : Depends: libc6 (= 2.11.2-10) but 2.13-21 is to be installed
             Depends: libc-dev-bin (= 2.11.2-10) but it is not going to be installed
             Recommends: gcc but it is not going to be installed or
                         c-compiler
E: Broken packages

私がした次のことは次のとおりです。

maistora@maistora:~$ sudo apt-get install libc6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libc6 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

私にとっては、これは奇妙に見えます。しかし、私はこれがあなたにとって基本的なものであると確信しています。だから私の質問は - Debian 6 Squeezeにビルドの前提条件をインストールする方法、またはgcc / g ++をインストールするための回避策です。

PS:文章を書いたら、sudo apt-get install gcc投稿の最初に到達しlibc6 is already the newest version.(私のポイントを明確に伝えてほしい)と終わります。よろしくお願いします。

ベストアンサー1

Debian 安定リリース (squeeze) と Debian ベータリリース (wheezy) または不安定リリース (sid) が混在しているようです。具体的には図書館6パッケージはベータ/不安定バージョンですが、パッケージソースは安定版を指します。

安定、テスト、不安定の間の分布を選択する必要があります。実際に混合することはできません(断続的な迷惑を気にしない場合は、テストと不安定を混在させることができますが、安定は遠すぎます)。

安定したバージョンを選択したら、システムをダウングレードする必要があります。ダウングレードはサポートされていますが、apt-getすべてのパッケージがダウングレードをサポートしているわけではないため、問題が発生する可能性があります。あなたはDebianを初めて使用するので、システムをあまりカスタマイズしていない限り再インストールすることをお勧めします。ホームディレクトリを保存して復元できます。ディレクトリをバックアップすることもできますが、/etc場合によってはそのディレクトリからファイルを復元できます。

テストまたは不安定を選択した場合ソフトウェアソース私達が今または言うところにまたはまたはまたは/etc/apt/sources.listあります。testingwheezyunstablesidstablesqueeze

ところで、build-essentialパッケージをインストールすることが開発ツールをインストールする良い方法であることは事実です。そしてgccはLinuxの事実上標準CおよびC ++コンパイラです。非常に具体的な要件がある場合にのみ、他のコンパイラを使用します。

おすすめ記事