Centos

CentOS 9 Stream - 執行 yum 更新時出錯

  • February 22, 2022

我是從使用 Ubuntu 進來的。

剛剛在我的 DEV 伺服器上安裝了 CentOS,並且在進行更新或安裝新軟體包時立即遇到問題。

這是錯誤:

sudo yum update

Last metadata expiration check: 0:41:22 ago on Tue 15 Feb 2022 10:38:21 AM.
Error:

Problem 1: problem with installed package libidn2-2.3.0-7.el9.x86_64
 - cannot install the best update candidate for package libidn2-2.3.0-7.el9.x86_64
 - nothing provides libunistring.so.0()(64bit) needed by libidn2-2.3.2-1.el7.x86_64

Problem 2: cannot install the best update candidate for package python3-tracer-0.7.5-4.el9.noarch
 - problem with installed package python3-tracer-0.7.5-4.el9.noarch
 - package python3-tracer-0.7.5-4.el9.noarch requires tracer-common = 0.7.5-4.el9, but none of the providers can be installed
 - cannot install the best update candidate for package tracer-common-0.7.5-4.el9.noarch
 - cannot install both tracer-common-0.7.8-1.el7.noarch and tracer-common-0.7.5-4.el9.noarch

以下是啟用的儲存庫:

yum repolist enabled
repo id       repo name
appstream     CentOS Stream 9 - AppStream
baseos        CentOS Stream 9 - BaseOS
epel          Extra Packages for Enterprise Linux 7 - x86_64
extras-common CentOS Stream 9 - Extras packages
remi-safe     Safe Remi's RPM repository for Enterprise Linux 7 - x86_6

我試圖:

sudo yum update --best --allowerasing

但它仍然在抱怨:

Problem 1: problem with installed package libidn2-2.3.0-7.el9.x86_64
 - cannot install the best update candidate for package libidn2-2.3.0-7.el9.x86_64
 - nothing provides libunistring.so.0()(64bit) needed by libidn2-2.3.2-1.el7.x86_64
Problem 2: cannot install the best update candidate for package python3-tracer-0.7.5-4.el9.noarch
 - problem with installed package python3-tracer-0.7.5-4.el9.noarch
 - package python3-tracer-0.7.5-4.el9.noarch requires tracer-common = 0.7.5-4.el9, but none of the providers can be installed
 - cannot install the best update candidate for package tracer-common-0.7.5-4.el9.noarch
 - cannot install both tracer-common-0.7.8-1.el7.noarch and tracer-common-0.7.5-4.el9.noarch
(try to add '--skip-broken' to skip uninstallable packages)

任何想法如何解決這一問題?

更新:

試過了

yum clean all
yum check
yum check-update
yum update

yum update --nobest

結果相同:

Last metadata expiration check: 0:49:35 ago on Tue 15 Feb 2022 11:30:57 AM.
Dependencies resolved.

Problem 1: cannot install the best update candidate for package libidn2-2.3.0-7.el9.x86_64
 - nothing provides libunistring.so.0()(64bit) needed by libidn2-2.3.2-1.el7.x86_64
Problem 2: package python3-tracer-0.7.5-4.el9.noarch requires tracer-common = 0.7.5-4.el9, but none of the providers can be installed
 - cannot install both tracer-common-0.7.8-1.el7.noarch and tracer-common-0.7.5-4.el9.noarch
 - cannot install the best update candidate for package tracer-common-0.7.5-4.el9.noarch
 - cannot install the best update candidate for package python3-tracer-0.7.5-4.el9.noarch
==================================================================================================================================================
Package                                Architecture                    Version                               Repository                     Size
==================================================================================================================================================
Skipping packages with conflicts:
(add '--best --allowerasing' to command line to force their upgrade):
tracer-common                          noarch                          0.7.8-1.el7                           epel                           31 k
Skipping packages with broken dependencies:
libidn2                                x86_64                          2.3.2-1.el7                           epel                          148 k

baseos CentOS Stream 9 - 適用於 Enterprise Linux 7 的 BaseOS epel 額外軟體包 - x86_64 extras-common CentOS Stream 9 - 額外軟體包

在執行 EL-9 時,您正在為 EL-7 使用舊的 EPEL(和“remi”)

您需要刪除 epel-release 和 remi-release 並安裝正確的版本。

嘗試:

yum clean all
yum check
yum check-update
yum update

如果仍然存在問題,請嘗試:

yum update --nobest

引用自:https://serverfault.com/questions/1093783