![YUM 无法解决旧版本要求的依赖关系](https://linux22.com/image/117004/YUM%20%E6%97%A0%E6%B3%95%E8%A7%A3%E5%86%B3%E6%97%A7%E7%89%88%E6%9C%AC%E8%A6%81%E6%B1%82%E7%9A%84%E4%BE%9D%E8%B5%96%E5%85%B3%E7%B3%BB.png)
YUM 无法解析我的存储库中旧版本的依赖项。尽管旧版本(满足依赖约束)仍然可用,但存在较新版本的事实似乎令人困惑。
我的包myapp-1.0.0
有一个依赖项,例如:
Requires: mydep >= 0.10.0, mydep < 0.11.0
在我的存储库中有多个mydep
可用版本:
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
当我尝试安装myapp
YUM 失败时:
$ 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
交换依赖约束的顺序不起作用:
Requires: mydep < 0.11.0, mydep >= 0.10.0
有没有办法让 YUM 自动查找旧版本,而无需先自己安装?