2

YUM is failing to resolve an old version of a dependency in my repository. It seems to be getting confused by the fact that there is a newer version present, even though the older version (which satisfies a dependency constraint) is still available.

My package myapp-1.0.0 has a dependency like:

Requires: mydep >= 0.10.0, mydep < 0.11.0

In my repository there are multiple versions of mydep available:

mydep-0.9.0-1.el7.centos.x86_64
mydep-0.10.0-1.el7.centos.x86_64
mydep-0.11.0-1.el7.centos.x86_64

When I try to install myapp YUM fails:

$ sudo yum -y install myapp
...
Resolving Dependencies
--> Running transaction check
---> Package myapp.x86_64 0:1.0.0-1.el7.centos will be installed
--> Processing Dependency: mydep < 0.11.0 for package: myapp-1.0.0-1.el7.centos.x86_64
--> Processing Dependency: mydep >= 0.10.0 for package: myapp-1.0.0-1.el7.centos.x86_64
--> Running transaction check
---> Package mydep.x86_64 0:0.11.0-1.el7.centos will be installed
---> Package myapp.x86_64 0:1.0.0-1.el7.centos will be installed
--> Processing Dependency: mydep < 0.11.0 for package: myapp-1.0.0-1.el7.centos.x86_64
--> Finished Dependency Resolution
Error: Package: myapp-1.0.0-1.el7.centos.x86_64 (...)
           Requires: mydep < 0.11.0
           Available: mydep-0.9.0-1.el7.centos.x86_64 (...)
               mydep = 0.9.0-1.el7.centos
               mydep = 0.9.0
           Available: mydep-0.10.0-1.el7.centos.x86_64 (...)
               mydep = 0.10.0-1.el7.centos
               mydep = 0.10.0
           Available: mydep-0.11.0-1.el7.centos.x86_64 (...)
               mydep = 0.11.0-1.el7.centos
               mydep = 0.11.0
You could try using --skip-broken to work around the problem

Swapping the order of the dependency constraints doesn't work:

Requires: mydep < 0.11.0, mydep >= 0.10.0

Is there a way to get YUM to automatically find the old version, without installing it myself first?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.