大网数据广告活动
服务器运维问答

yum not updating dependency during install

· 52CE 我爱测

I have a situation where my-software requires my-common via: Requires: my-common >= 1.2.0 During yum update my-software , my-common is not upgraded, and is left at version 0.0.1 . Why is yum not updating my-common -- and the inst…

问题原文

原帖链接 · Josh M. · CC BY-SA 4.0

I have a situation where my-software requires my-common via:

Requires: my-common >= 1.2.0

During yum update my-software, my-common is not upgraded, and is left at version 0.0.1.

Why is yum not updating my-common -- and the install of my-software completes without error, even though the dependency for my-common is not resolved?


See:

# yum deplist my-software
package: my-software.noarch 1.1.0-1637255366
  dependency: /bin/sh
   provider: bash.x86_64 4.2.46-34.el7
  dependency: my-common >= 1.2.0
   provider: my-common.x86_64 1.2.0-1637243847.el7_9
   provider: my-common.noarch 0.0.1-20180703160841.el7

Note that yum thinks that my-common is resolved by either of:

  • my-common.x86_64 1.2.0-1637243847.el7_9
  • my-common.noarch 0.0.1-20180703160841.el7

The latter is already installed. Running yum update my-common correctly updates to the 1.2.0 version, and then my-software works correctly.

Noting that the timestamp in the latter package is incorrectly formatted and appears "newer" than the first. But the first has the version I'm requiring, so I would have expected the latter to be completely excluded from the list of valid packages.

已采纳解答

原帖链接 · Gnuth · CC BY-SA 4.0

Maybe it is because the inproper Provides in spec file of my-common.

I encountered the similar problem, and finally I found that, the Provides in spec was misconfigured.

For example,

# without version
Provides: my-common

After this line was removed, newer version could be normally updated by yum install.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2021-11-18)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。