CentOS 9 Stream - 执行 yum 更新时出错

CentOS 9 Stream - 执行 yum 更新时出错

我刚刚开始使用 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

答案1

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 并安装适当的版本。

答案2

尝试:

yum clean all
yum check
yum check-update
yum update

如果仍有问题,请尝试:

yum update --nobest

答案3

搞清楚了,我从 CentOS 7 复制粘贴并添加了 epel,因此它与 CentOS 9 上现有的 epel 冲突。

用它来删除旧的 repo:

sudo yum remove epel-release-latest-7.noarch.rpm

仅供参考:显然有 epel-next:

https://www.linuxcapable.com/how-to-install-enable-epel-epel-next-repository-on-centos-9-stream/

更新:

正如其他人提到的,CentOS9 上的 repos 有更新的官方指南: https://docs.fedoraproject.org/en-US/epel/#_centos_stream_9

相关内容