依存関係が競合するパッケージを識別する方法は?

依存関係が競合するパッケージを識別する方法は?

実行すると、sudo apt upgrade次のエラーメッセージが表示されます。

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:
 libcurl4 : Conflicts: libcurl3 but 7.60.0-1 is to be installed
E: Broken packages

私はこの文の意味を理解しています:

  • 以前に依存関係パッケージXをインストールしたため、すでにインストールされていlibcurl4ますlibcurl4
  • アップグレードには、(バージョン7.60.0-1)への新しい依存関係を持つパッケージYが含まれていますlibcurl3
  • libcurl3に関連しているためインストールできませんlibcurl4

libcurl3とlibcurl4が必要なパッケージのリストを表示するためにGNOMEパッケージを使用しましたが、リストが長くなって範囲を狭めることはできません。特に、どのパッケージがすでにインストールされているのか、すぐにインストールされるパッケージなのかは表示されません。

適切なデバッグを試みたが、情報が追加されていないようです。

$ sudo apt -o Debug::pkgProblemResolver=yes upgrade                                                                                                           
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Entering ResolveByKeep 10%
  Dependencies are not satisfied for libcurl4:amd64 < 7.60.0-2 @ii mK Ib >
Keeping package libcurl4:amd64
  Dependencies are not satisfied for libcurl4:amd64 < 7.60.0-2 @ii mK Ib >
Package libcurl4:amd64 libcurl4:amd64 Conflicts on libcurl3:amd64 < none -> 7.60.0-1 @un uN >
  Dependencies are not satisfied for libcurl4:amd64 < 7.60.0-2 @ii mK Ib >
  Dependencies are not satisfied for libcurl4:amd64 < 7.60.0-2 @ii mK Ib >
  Dependencies are not satisfied for libcurl4:amd64 < 7.60.0-2 @ii mK Ib >
Calculating upgrade... Done
<repeats previous error message>

パッケージX(既存のパッケージ)とパッケージY(新しいパッケージまたは新しい依存関係を持つ既存のパッケージ)を識別する方法は?

ベストアンサー1

パッケージのアップグレード中に競合(またはその他の問題)を引き起こすパッケージを識別するために私が見つけた最も便利な方法は、リゾルバのデバッグモードを有効にすることです。

apt -o Debug::pkgProblemResolver=yes upgrade

これにより、パーサーが直面するすべての問題と問題のある依存関係を考慮に入れたパッケージが表示されます。

おすすめ記事