首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >CentOS 9流-执行yum更新的错误

CentOS 9流-执行yum更新的错误
EN

Server Fault用户
提问于 2022-02-15 19:26:26
回答 3查看 4.5K关注 1票数 2

我是用Ubuntu来的。

只需在我的DEV服务器上安装CentOS,就会立即出现问题,只需进行更新或安装新的软件包。

以下是错误:

代码语言:javascript
运行
复制
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

以下是启用的repos:

代码语言:javascript
运行
复制
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

我试图:

代码语言:javascript
运行
复制
sudo yum update --best --allowerasing

但它仍在抱怨:

代码语言:javascript
运行
复制
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)

有什么办法解决这个问题吗?

更新:

试过

代码语言:javascript
运行
复制
yum clean all
yum check
yum check-update
yum update

yum update --nobest

同样的结果:

代码语言:javascript
运行
复制
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
EN

回答 3

Server Fault用户

回答已采纳

发布于 2022-02-16 07:08:19

baseos流9-企业Linux 7的BaseOS epel额外包- x86_64附加程序-常见的CentOS流9- Extras包

在运行EL-9时,您将旧的EPEL (和"remi")用于EL-7。

您需要删除epel版本和remi版本,并安装正确的版本。

票数 5
EN

Server Fault用户

发布于 2022-02-15 20:09:14

尝试:

代码语言:javascript
运行
复制
yum clean all
yum check
yum check-update
yum update

如果仍然存在问题,请尝试:

yum update --nobest

票数 1
EN

Server Fault用户

发布于 2022-02-16 17:07:09

我想出了办法,从CentOS 7中复制、粘贴并添加了epel,因此它与CentOS 9上现有的epel相冲突。

使用此方法移除旧的回购:

代码语言:javascript
运行
复制
sudo yum remove epel-release-latest-7.noarch.rpm

菲伊:显然是埃佩尔-下一个:

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

更新:

正如其他人所提到的,有一个关于CentOS9:https://docs.fedoraproject.org/en-US/epel/#_centos_流_9上的回复的最新官方指南。

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/1093783

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档