GNU/Linux >> Linux の 問題 >  >> Cent OS

「パッケージに最適な更新候補をインストールできません」 – dnf update の実行時のエラー

問題

「dnf update」コマンドを実行すると、次のエラーで失敗します:

# dnf update

Error:
Problem 1: package perl-4:5.26.3-419.el8.x86_64 requires perl-interpreter(x86-64) = 4:5.26.3-419.el8, but none of the providers can be installed
- cannot install both perl-interpreter-4:5.26.3-419.el8_4.1.x86_64 and perl-interpreter-4:5.26.3-419.el8.x86_64
- cannot install the best update candidate for package perl-interpreter-4:5.26.3-419.el8.x86_64
- cannot install the best update candidate for package perl-4:5.26.3-419.el8.x86_64
Problem 2: package perl-devel-4:5.26.3-419.el8.x86_64 requires perl-libs(x86-64) = 4:5.26.3-419.el8, but none of the providers can be installed
- cannot install both perl-libs-4:5.26.3-419.el8_4.1.x86_64 and perl-libs-4:5.26.3-419.el8.x86_64
- cannot install the best update candidate for package perl-libs-4:5.26.3-419.el8.x86_64
- cannot install the best update candidate for package perl-devel-4:5.26.3-419.el8.x86_64
Problem 3: perl-libs-4:5.26.3-419.el8.i686 has inferior architecture
- package perl-utils-5.26.3-419.el8.noarch requires perl-libs = 4:5.26.3-419.el8, but none of the providers can be installed
- cannot install both perl-libs-4:5.26.3-419.el8_4.1.x86_64 and perl-libs-4:5.26.3-419.el8.x86_64
- package perl-Errno-1.28-419.el8_4.1.x86_64 requires perl-libs(x86-64) = 4:5.26.3-419.el8_4.1, but none of the providers can be installed
- cannot install the best update candidate for package perl-utils-5.26.3-419.el8.noarch
- cannot install the best update candidate for package perl-Errno-1.28-419.el8.x86_64
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

上記の報告されたパッケージを個別に更新しようとすると、同様のエラーが発生します。

# dnf update perl-interpreter

Error:
Problem: problem with installed package perl-4:5.26.3-419.el8.x86_64
- package perl-4:5.26.3-419.el8.x86_64 requires perl-interpreter(x86-64) = 4:5.26.3-419.el8, but none of the providers can be installed
- cannot install both perl-interpreter-4:5.26.3-419.el8_4.1.x86_64 and perl-interpreter-4:5.26.3-419.el8.x86_64
- cannot install the best update candidate for package perl-interpreter-4:5.26.3-419.el8.x86_64
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages) 

dnf キャッシュ「dnf clean all」をクリアしても、違いはありませんでした。

# dnf clean all

解決策

この場合、perl-interpreter と perl-libs パッケージが問題を引き起こしています。これは、これらのパッケージのメタデータの問題が原因である可能性があります。この問題を回避するには、次のコマンドを実行します。

1. 次のコマンドを実行して、更新が進行するかどうかを確認します。それでも更新されない場合、「–best –allowerasing」オプションで削除できないパッケージを特定するのに役立ちます。この場合、まだ更新をブロックしているのは perl-libs パッケージです。

# dnf update --best --allowerasing
Error:
Problem: cannot install the best update candidate for package perl-4:5.26.3-419.el8.x86_64
- problem with installed package perl-4:5.26.3-419.el8.x86_64
- package perl-4:5.26.3-419.el8.x86_64 requires perl-libs(x86-64) = 4:5.26.3-419.el8, but none of the providers can be installed
- cannot install the best update candidate for package perl-libs-4:5.26.3-419.el8.x86_64
- cannot install both perl-libs-4:5.26.3-419.el8_4.1.x86_64 and perl-libs-4:5.26.3-419.el8.x86_64
(try to add '--skip-broken' to skip uninstallable packages)

2. ステップ 1 のコマンド出力からパッケージの更新を実行します。この場合、それは perl-libs です。

# dnf update perl-libs.x86_64 --best --allowerasing

3. 次に、通常の更新を試みます:

# dnf update


Cent OS
  1. コマンドラインでのDNFを使用したCentOS8パッケージ管理

  2. CentOS7を使用するPPC64LEにPHP7.2.3用のMySQLnd拡張機能をインストールします

  3. Centos – Yum Updateが失敗する:エラー:リポジトリのリポジトリメタデータ(repomd.xml)を取得できません…?

  1. E:パッケージを再インストールする必要がありますが、アーカイブが見つかりませんか?

  2. PPM インストール エラー:パッケージに適したインストール先が見つかりません

  3. 「レポの ID が正しくありません:マイレポ、バイト =2」yum 更新エラー

  1. 左4CentOS専用サーバーインストールガイド

  2. Sudo Apt-get -f Installの実行中にエラーが発生しましたか?

  3. Linux 用 R パッケージのインストール エラー