@miffyes

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

Ubuntu 18.04のapt-getにおける依存問題

解決したいこと

apt-get install [package名]やapt-get upgradeを行うと、「以下のパッケージには満たせない依存関係があります」と出てきて、実行できません。
これを修正したいです。

発生している問題・エラー

upgradeを試みると、

$sudo apt-get upgrade
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています                
状態情報を読み取っています... 完了
これらを直すためには 'apt --fix-broken install' を実行する必要があるかもしれません。
以下のパッケージには満たせない依存関係があります:
 libc6-dbg : 依存: libc6 (= 2.27-3ubuntu1.5) しかし、2.27-3ubuntu1.2 はインストールされています
 libc6-dev : 依存: libc6 (= 2.27-3ubuntu1.5) しかし、2.27-3ubuntu1.2 はインストールされています
E: 未解決の依存関係です。'apt --fix-broken install' を実行してみてください (または解法を明示してください)。

となり、installを試みても全く同じ状況です。

自分で試したこと

エラーに書かれているように、'apt --fix-broken install' を実行すると

$sudo apt --fix-broken install
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています                
状態情報を読み取っています... 完了
依存関係を解決しています ... 完了
以下の追加パッケージがインストールされます:
  libc6 libc6:i386
提案パッケージ:
  glibc-doc glibc-doc:i386 locales:i386
以下のパッケージはアップグレードされます:
  libc6 libc6:i386
アップグレード: 2 個、新規インストール: 0 個、削除: 0 個、保留: 298 個。
8 個のパッケージが完全にインストールまたは削除されていません。
5,382 kB 中 0 B のアーカイブを取得する必要があります。
この操作後に追加で 18.4 kB のディスク容量が消費されます。
続行しますか? [Y/n] y
debconf: Perl may be unconfigured (Can't locate Debconf/Log.pm in @INC (you may need to install the Debconf::Log module) (@INC contains: /usr/local/lib/perl5/site_perl/5.30.1/x86_64-linux-thread-multi /usr/local/lib/perl5/site_perl/5.30.1 /usr/local/lib/perl5/5.30.1/x86_64-linux-thread-multi /usr/local/lib/perl5/5.30.1) at (eval 1) line 4.
BEGIN failed--compilation aborted at (eval 1) line 4.
) -- aborting
(データベースを読み込んでいます ... 現在 243469 個のファイルとディレクトリがインストールされています。)
.../libc6_2.27-3ubuntu1.5_amd64.deb を展開する準備をしています ...
libc6:i386 (2.27-3ubuntu1.2) を設定削除しています ...
Can't locate Debconf/Db.pm in @INC (you may need to install the Debconf::Db module) (@INC contains: /usr/local/lib/perl5/site_perl/5.30.1/x86_64-linux-thread-multi /usr/local/lib/perl5/site_perl/5.30.1 /usr/local/lib/perl5/5.30.1/x86_64-linux-thread-multi /usr/local/lib/perl5/5.30.1) at /usr/share/debconf/frontend line 6.
BEGIN failed--compilation aborted at /usr/share/debconf/frontend line 6.
dpkg: アーカイブ /var/cache/apt/archives/libc6_2.27-3ubuntu1.5_amd64.deb の処理中にエラーが発生しました (--unpack):
 new libc6:amd64 package pre-installation script subprocess returned error exit status 2
.../libc6_2.27-3ubuntu1.5_i386.deb を展開する準備をしています ...
libc6:amd64 (2.27-3ubuntu1.2) を設定削除しています ...
Can't locate Debconf/Db.pm in @INC (you may need to install the Debconf::Db module) (@INC contains: /usr/local/lib/perl5/site_perl/5.30.1/x86_64-linux-thread-multi /usr/local/lib/perl5/site_perl/5.30.1 /usr/local/lib/perl5/5.30.1/x86_64-linux-thread-multi /usr/local/lib/perl5/5.30.1) at /usr/share/debconf/frontend line 6.
BEGIN failed--compilation aborted at /usr/share/debconf/frontend line 6.
dpkg: アーカイブ /var/cache/apt/archives/libc6_2.27-3ubuntu1.5_i386.deb の処理中にエラーが発生しました (--unpack):
 new libc6:i386 package pre-installation script subprocess returned error exit status 2
処理中にエラーが発生しました:
 /var/cache/apt/archives/libc6_2.27-3ubuntu1.5_amd64.deb
 /var/cache/apt/archives/libc6_2.27-3ubuntu1.5_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

となり、悪さをしている部分をしらべるため'dpkg --audit'を実行すると

$sudo dpkg --audit
以下のパッケージは展開されましたが、まだ設定されていません。
これらのパッケージが正常に動作するためには、dpkg --configure か
dselect の設定 (configure) メニューオプションを使って設定を完了
させなければなりません:
 libc6-dbg:amd64      GNU C Library: detached debugging symbols
 libc6-dev:amd64      GNU C Library: Development Libraries and Header Files
 linux-generic        Complete Generic Linux kernel and headers
 linux-image-generic  Generic Linux kernel image
 linux-modules-extra-4.15.0-156-generic Linux kernel extra modules for version 

以下のパッケージは最初の設定中に問題が発生したため、設定が終了していません。
dpkg --configure <パッケージ> か dselect で設定 (configure) メニューオプショ
ンを使って設定作業を再試行しなければなりません:
 linux-base           Linux image base package
 linux-firmware       Firmware for Linux kernel drivers
 linux-image-4.15.0-156-generic Signed kernel image generic

以下のパッケージはトリガされましたが、トリガ処理はまだ完了していません。
トリガ処理は dselect または dpkg --configure --pending (あるいは dpkg
--triggers-only) の利用で要求できます。
 initramfs-tools      generic modular initramfs generator (automation)
 libc-bin             GNU C Library: Binaries

となります。

調べてみると問題が発生したパッケージを一旦消して入れ直している人を散見したのですが、私の場合linux-baseやlinux-firmware等に問題があるため、OSごと壊してしまいそうで何もできておりません。
Ubuntuのソフトウェアの根幹等が全くわかっていないため、問題点や対処法を教えていただけたら幸いです。

0 likes

1Answer

Your answer might help someone💌