apt-get アップグレードの実行中、または apt-get を使用して何かをインストール中にエラーが発生しました。

apt-get アップグレードの実行中、または apt-get を使用して何かをインストール中にエラーが発生しました。

Debian 9.0 サーバーに何かをインストールまたはアップグレードしようとするとエラーが発生します。

これは端末が私に返すものです。

root@engelmar:~# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 cdebconf : Depends: libdebian-installer4 (>= 0.110) but it is not installed
            Depends: libtextwrap1 but it is not installed
 libc-bin : Depends: libc6 (< 2.25) but 2.28-10 is installed
 libc-dev-bin : Depends: libc6 (< 2.25) but 2.28-10 is installed
 libc6-dev : Depends: libc6 (= 2.24-11+deb9u4) but 2.28-10 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
root@engelmar:~# apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  linux-libc-dev python-all sysstat
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  libdebian-installer4 libtextwrap1
The following packages will be REMOVED:
  build-essential g++ g++-6 libc-bin libc-dev-bin libc6-dev libexpat1-dev libpython-all-dev libpython-dev libpython2.7-dev libstdc++-6-dev python-all-dev python-dev
  python2.7-dev
The following NEW packages will be installed:
  libdebian-installer4 libtextwrap1
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  libc-bin
0 upgraded, 2 newly installed, 14 to remove and 0 not upgraded.
5 not fully installed or removed.
Need to get 0 B/201 kB of archives.
After this operation, 102 MB 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!
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "pt_BR:pt:en",
        LC_ALL = (unset),
        LANG = "pt_BR.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_ALL to default locale: Arquivo ou diretório não encontrado
debconf: delaying package configuration, since apt-utils is not installed
dpkg: error processing package debconf (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Errors were encountered while processing:
 debconf
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@engelmar:~#

誰もが問題を解決する方法を知っていますか?

ベストアンサー1

申し訳ありません。システムが修理できないほど損傷している可能性があります。何が起こっているのかを確認するために逆さまに作業しようとすると、Debian 9システムを実行していますが、libc6以下からパッケージをインストールしたと言います。Debian 10(2.28)。これは通常、複数のDebianバージョンまたはDebian派生バージョン(Ubuntuなど)のリポジトリを混在させようとしたときに発生します。Debian Wikiには、このトピックについて話す内容があります。

FrankenDebianを作成しないでください

Debian Stableは他のバージョンで使用しないでください。現在Debianの安定版で利用できないソフトウェアをインストールしたい場合は、他のDebianバージョン用のリポジトリを追加するのは良い考えではありません。これらの問題はすぐには発生しない可能性がありますが、次回のアップデートのインストール時に発生する可能性があります。

問題が発生する可能性のある理由は、特定のDebianバージョン用にパッケージ化されたソフトウェアが、そのバージョンの他のソフトウェアと互換性があるように設計されているためです。たとえば、拡張システムにBusterパッケージをインストールすると、libc6を含む最新バージョンのコアライブラリもインストールできます。これはテストも安定もしませんが、2つの混合システムが作成されます。

この段階で最善の選択は、おそらくデータをバックアップし、オペレーティングシステムを再インストールすることです。今回は、リポジトリがDebian 9に適していないリポジトリからデータを取得しようとしないようにする必要があります。

おすすめ記事